:root {
    --primary-color: #0f3d24;
    /* Deep Bloody Green */
    --secondary-color: #27c469;
    /* Neon Green */
    --accent-color: #ffffff;
    --bg-color: #020b05;
    /* Ancient Black/Green */
    --card-bg: rgba(10, 26, 18, 0.7);
    /* Translucent Dark Green */
    --text-color: #e0e0e0;
    --input-bg: rgba(20, 48, 34, 0.6);
    --error-color: #ff4d4d;
    --success-color: #4caf50;
    --glow-color: rgba(39, 196, 105, 0.4);
    --font-family: 'Outfit', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-image:
        radial-gradient(circle at 50% -20%, rgba(15, 61, 36, 0.4) 0%, transparent 60%),
        radial-gradient(circle at 10% 90%, rgba(39, 196, 105, 0.05) 0%, transparent 40%);
    overflow-y: auto;
}

/* Overlay Styles */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    /* Dark background */
    backdrop-filter: blur(15px);
    /* Strong blur */
    -webkit-backdrop-filter: blur(15px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.overlay-content {
    max-width: 450px;
    border: 1px solid var(--secondary-color);
    box-shadow: 0 0 30px rgba(39, 196, 105, 0.3);
}

.disclaimer-text {
    text-align: left;
    margin: 20px 0;
    font-size: 14px;
    color: #aeaeae;
    line-height: 1.6;
}

.channel-list {
    list-style: none;
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
    border-left: 3px solid var(--secondary-color);
}

.channel-list li {
    margin-bottom: 5px;
    color: var(--accent-color);
    font-family: monospace;
    font-size: 13px;
}

.overlay-btn {
    background: #1a1a1a;
    color: #444;
    cursor: not-allowed;
    border: 1px solid #222;
    opacity: 0.5;
    /* Muted look */
}

.overlay-btn.active {
    background: var(--secondary-color);
    color: #000;
    cursor: pointer;
    border-color: var(--secondary-color);
    box-shadow: 0 0 15px var(--glow-color);
}

.blur-content {
    filter: blur(5px);
    transition: filter 0.5s ease;
}

/* Particle Container */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    background: var(--secondary-color);
    border-radius: 50%;
    opacity: 0;
    box-shadow: 0 0 10px var(--secondary-color);
    animation: floatUp linear forwards;
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }

    10% {
        opacity: 0.5;
    }

    90% {
        opacity: 0.2;
    }

    100% {
        transform: translateY(-10vh) scale(1);
        opacity: 0;
    }
}

.container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
    z-index: 10;
}

.card {
    background-color: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 16px;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(39, 196, 105, 0.1),
        inset 0 0 20px rgba(39, 196, 105, 0.05);
    text-align: center;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.6),
        0 0 25px rgba(39, 196, 105, 0.2),
        inset 0 0 30px rgba(39, 196, 105, 0.1);
    border-color: rgba(39, 196, 105, 0.4);
}

/* Flattened Elements */
.logo,
h2,
p,
form,
.footer-link {
    /* Removed translateZ */
}

.logo {
    font-size: 32px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 30px;
    letter-spacing: 4px;
    text-shadow: 0 0 20px rgba(39, 196, 105, 0.4);
}

.logo span {
    color: var(--accent-color);
}

h2 {
    margin-bottom: 10px;
    color: var(--accent-color);
    font-weight: 500;
    font-size: 1.5rem;
}

.subtitle {
    color: #889990;
    font-size: 14px;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 11px;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

.input-group {
    position: relative;
    width: 100%;
    z-index: 1;
    /* Base z-index */
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    padding-right: 45px;
    /* Ensure text doesn't hit icon */
    background-color: var(--input-bg);
    border: 1px solid rgba(39, 196, 105, 0.2);
    border-radius: 8px;
    color: var(--accent-color);
    font-size: 14px;
    transition: all 0.3s;
    position: relative;
    z-index: 2;
    /* Below toggle but above group background */
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary-color);
    background-color: rgba(39, 196, 105, 0.1);
    box-shadow: 0 0 15px rgba(39, 196, 105, 0.2);
}

.password-toggle {
    position: absolute;
    right: 15px;
    /* Moved slightly more left to be safe */
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #6d8a7a;
    transition: color 0.3s;
    user-select: none;
    z-index: 10;
    /* Above input */
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 30px;
}

.password-toggle:hover {
    color: var(--secondary-color);
    text-shadow: 0 0 10px var(--secondary-color);
}

.btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary-color), #082113);
    color: var(--secondary-color);
    border: 1px solid rgba(39, 196, 105, 0.3);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn:hover {
    background: var(--secondary-color);
    color: #000;
    box-shadow: 0 0 30px rgba(39, 196, 105, 0.4);
    border-color: var(--secondary-color);
}

.footer-link {
    margin-top: 25px;
    font-size: 13px;
    color: #6d8a7a;
}

.footer-link a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: text-shadow 0.3s;
}

.footer-link a:hover {
    text-shadow: 0 0 10px var(--secondary-color);
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 13px;
    display: none;
    animation: shake 0.5s;
    backdrop-filter: blur(5px);
}

/* 2D Shake */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

.alert.success {
    background-color: rgba(39, 196, 105, 0.15);
    color: #4fffa1;
    border: 1px solid rgba(39, 196, 105, 0.4);
}

.alert.warning {
    background-color: rgba(255, 152, 0, 0.1);
    color: #ffb74d;
    border: 1px solid rgba(255, 152, 0, 0.4);
}

.hidden {
    display: none;
}

footer.copyright {
    position: fixed;
    bottom: 0;
    width: 100%;
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.2);
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    z-index: 5;
}

/* 404 */
.not-found-code {
    font-size: 80px;
    color: var(--secondary-color);
    text-shadow: 0 0 30px var(--secondary-color);
}

/* Admin Dashboard Styles */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(39, 196, 105, 0.2);
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--secondary-color);
}

.stat-card h3 {
    font-size: 12px;
    color: #889990;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-card .value {
    font-size: 32px;
    font-weight: 700;
    color: var(--accent-color);
}

.stat-card .value.active {
    color: #4fffa1;
    text-shadow: 0 0 10px rgba(79, 255, 161, 0.4);
}

.stat-card .value.secure {
    color: #ffb74d;
    text-shadow: 0 0 10px rgba(255, 183, 77, 0.4);
}

/* Table Enhancements */
.table-title {
    text-align: left;
    font-size: 14px;
    color: var(--secondary-color);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 1px solid rgba(39, 196, 105, 0.2);
    padding-bottom: 5px;
}

.table-container {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: rgba(39, 196, 105, 0.1);
    color: var(--secondary-color);
    padding: 12px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: left;
}

td {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 13px;
    color: #cccccc;
    text-align: left;
    vertical-align: middle;
}

tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Scrollbar for table */
.table-container::-webkit-scrollbar {
    width: 6px;
}

.table-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.table-container::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 3px;
}

/* Password Requirements */
.password-requirements {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0);
    border-radius: 10px;
    padding: 0 15px;
    margin: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 15px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.password-requirements.visible {
    max-height: 100px;
    opacity: 1;
    padding: 12px 15px;
    margin: 10px 0;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.requirement {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
}

.requirement.met {
    color: var(--secondary-color);
    text-shadow: 0 0 8px rgba(39, 196, 105, 0.3);
}

.requirement .req-icon {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.requirement.met .req-icon {
    background: var(--secondary-color);
    box-shadow: 0 0 10px var(--secondary-color);
    transform: scale(1.2);
}