/* ========================================
   STAFA.NET ACCESS PANEL - MODERN STYLE
   ======================================== */

/* CSS Variables for Theming */
:root {
    /* Light Theme */
    --bg-primary: #f0f4f8;
    --bg-secondary: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.7);
    --text-primary: #1a2a3a;
    --text-secondary: #4a5a6a;
    --accent: #0096ff;
    --accent-hover: #007acc;
    --accent-glow: rgba(0, 150, 255, 0.4);
    --shadow: rgba(0, 0, 0, 0.1);
    --border: rgba(0, 0, 0, 0.08);
    --group-bg: rgba(255, 255, 255, 0.6);
    --btn-gradient: linear-gradient(135deg, #00b4ff 0%, #0066ff 100%);
    --btn-primary-gradient: linear-gradient(135deg, #00d4aa 0%, #00b488 100%);
    --circle-1: rgba(0, 150, 255, 0.15);
    --circle-2: rgba(0, 200, 150, 0.12);
    --circle-3: rgba(100, 100, 255, 0.1);
}

[data-theme="dark"] {
    /* Dark Theme */
    --bg-primary: #0a1628;
    --bg-secondary: #142238;
    --bg-glass: rgba(20, 34, 56, 0.8);
    --text-primary: #ffffff;
    --text-secondary: #a0b0c0;
    --accent: #00d4ff;
    --accent-hover: #00a8cc;
    --accent-glow: rgba(0, 212, 255, 0.5);
    --shadow: rgba(0, 0, 0, 0.3);
    --border: rgba(255, 255, 255, 0.08);
    --group-bg: rgba(20, 34, 56, 0.7);
    --btn-gradient: linear-gradient(135deg, #00d4ff 0%, #0088ff 100%);
    --btn-primary-gradient: linear-gradient(135deg, #00ffaa 0%, #00cc88 100%);
    --circle-1: rgba(0, 212, 255, 0.1);
    --circle-2: rgba(0, 255, 170, 0.08);
    --circle-3: rgba(150, 100, 255, 0.08);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background 0.4s ease, color 0.4s ease;
    position: relative;
}

/* Network Pattern Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 1;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cdefs%3E%3Cstyle%3E.node%7Bfill:%230096ff%7D.line%7Bstroke:%230096ff;stroke-width:0.5;fill:none%7D%3C/style%3E%3C/defs%3E%3C!-- Network nodes --%3E%3Ccircle class='node' cx='10' cy='10' r='2'/%3E%3Ccircle class='node' cx='50' cy='10' r='3'/%3E%3Ccircle class='node' cx='90' cy='10' r='2'/%3E%3Ccircle class='node' cx='30' cy='30' r='2'/%3E%3Ccircle class='node' cx='70' cy='30' r='2'/%3E%3Ccircle class='node' cx='10' cy='50' r='2'/%3E%3Ccircle class='node' cx='50' cy='50' r='4'/%3E%3Ccircle class='node' cx='90' cy='50' r='2'/%3E%3Ccircle class='node' cx='30' cy='70' r='2'/%3E%3Ccircle class='node' cx='70' cy='70' r='2'/%3E%3Ccircle class='node' cx='10' cy='90' r='2'/%3E%3Ccircle class='node' cx='50' cy='90' r='3'/%3E%3Ccircle class='node' cx='90' cy='90' r='2'/%3E%3C!-- Connection lines --%3E%3Cpath class='line' d='M10 10 L30 30 M50 10 L30 30 M50 10 L70 30 M90 10 L70 30'/%3E%3Cpath class='line' d='M30 30 L50 50 M70 30 L50 50 M10 50 L50 50 M90 50 L50 50'/%3E%3Cpath class='line' d='M50 50 L30 70 M50 50 L70 70'/%3E%3Cpath class='line' d='M30 70 L10 90 M30 70 L50 90 M70 70 L50 90 M70 70 L90 90'/%3E%3C!-- Outer ring at center --%3E%3Ccircle cx='50' cy='50' r='8' stroke='%230096ff' stroke-width='0.3' fill='none'/%3E%3C/svg%3E");
    background-size: 150px 150px;
    animation: patternMove 80s linear infinite;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

[data-theme="dark"] body::before {
    opacity: 1;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cdefs%3E%3Cstyle%3E.node%7Bfill:%2300d4ff%7D.line%7Bstroke:%2300d4ff;stroke-width:0.5;fill:none%7D%3C/style%3E%3C/defs%3E%3C!-- Network nodes --%3E%3Ccircle class='node' cx='10' cy='10' r='2'/%3E%3Ccircle class='node' cx='50' cy='10' r='3'/%3E%3Ccircle class='node' cx='90' cy='10' r='2'/%3E%3Ccircle class='node' cx='30' cy='30' r='2'/%3E%3Ccircle class='node' cx='70' cy='30' r='2'/%3E%3Ccircle class='node' cx='10' cy='50' r='2'/%3E%3Ccircle class='node' cx='50' cy='50' r='4'/%3E%3Ccircle class='node' cx='90' cy='50' r='2'/%3E%3Ccircle class='node' cx='30' cy='70' r='2'/%3E%3Ccircle class='node' cx='70' cy='70' r='2'/%3E%3Ccircle class='node' cx='10' cy='90' r='2'/%3E%3Ccircle class='node' cx='50' cy='90' r='3'/%3E%3Ccircle class='node' cx='90' cy='90' r='2'/%3E%3C!-- Connection lines --%3E%3Cpath class='line' d='M10 10 L30 30 M50 10 L30 30 M50 10 L70 30 M90 10 L70 30'/%3E%3Cpath class='line' d='M30 30 L50 50 M70 30 L50 50 M10 50 L50 50 M90 50 L50 50'/%3E%3Cpath class='line' d='M50 50 L30 70 M50 50 L70 70'/%3E%3Cpath class='line' d='M30 70 L10 90 M30 70 L50 90 M70 70 L50 90 M70 70 L90 90'/%3E%3C!-- Outer ring at center --%3E%3Ccircle cx='50' cy='50' r='8' stroke='%2300d4ff' stroke-width='0.3' fill='none'/%3E%3C/svg%3E");
}

@keyframes patternMove {
    0% { background-position: 0 0; }
    100% { background-position: 150px 150px; }
}

/* Animated Background */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.floating-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: float 25s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.c1 {
    width: 400px;
    height: 400px;
    background: var(--circle-1);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.c2 {
    width: 350px;
    height: 350px;
    background: var(--circle-2);
    bottom: -50px;
    left: -100px;
    animation-delay: -7s;
}

.c3 {
    width: 300px;
    height: 300px;
    background: var(--circle-3);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

@keyframes float {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    20% { transform: translate3d(15px, -15px, 0) scale(1.05); }
    40% { transform: translate3d(30px, -30px, 0) scale(1.1); }
    60% { transform: translate3d(-10px, 10px, 0) scale(0.98); }
    80% { transform: translate3d(10px, 20px, 0) scale(1.03); }
    100% { transform: translate3d(0, 0, 0) scale(1); }
}

/* Container */
.container {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* Header */
.header {
    text-align: center;
    padding: 30px 20px;
    margin-bottom: 30px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid var(--border);
    box-shadow: 0 8px 32px var(--shadow);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.datetime-wrapper {
    text-align: left;
}

.clock {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 20px var(--accent-glow);
    animation: pulse-glow 2s infinite ease-in-out;
}

.date {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

/* Theme Toggle Button */
.theme-toggle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--bg-glass);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.4rem;
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 4px 20px var(--accent-glow);
    border-color: var(--accent);
}

.sun-icon, .moon-icon {
    position: absolute;
    transition: all 0.4s ease;
}

.sun-icon {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
}

.moon-icon {
    opacity: 0;
    transform: translateY(30px) rotate(-90deg);
}

[data-theme="dark"] .sun-icon {
    opacity: 0;
    transform: translateY(-30px) rotate(90deg);
}

[data-theme="dark"] .moon-icon {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
}

/* Auto Mode Indicator */
.auto-indicator {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.55rem;
    font-weight: 700;
    color: var(--accent);
    background: var(--bg-glass);
    padding: 1px 5px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    transition: opacity 0.3s ease;
    border: 1px solid var(--border);
}

/* Title */
.title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-shadow: 0 2px 10px var(--shadow);
}

.logo-icon {
    font-size: 2.2rem;
    animation: bounce 2s infinite ease-in-out;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: 8px;
    font-weight: 400;
}

/* Main Content */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Group Section */
.group {
    background: var(--group-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 24px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.group:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px var(--shadow);
}

.group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.group-icon {
    font-size: 1.5rem;
}

.group-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Button Grid */
.btn-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}

/* Buttons */
.btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 20px;
    background: var(--btn-gradient);
    border-radius: 14px;
    text-decoration: none;
    color: white;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 25px var(--accent-glow);
}

.btn:active {
    transform: translateY(-2px) scale(1.01);
}

.btn-primary {
    background: var(--btn-primary-gradient);
}

.btn-icon {
    font-size: 1.3rem;
    margin-bottom: 6px;
}

.btn-text {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.btn-ip {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-top: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    background: rgba(0, 0, 0, 0.15);
    padding: 3px 8px;
    border-radius: 6px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 25px;
    margin-top: 30px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(25px);
    animation: fadeInUp 0.6s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .header {
        padding: 20px 15px;
    }

    .header-top {
        flex-direction: column-reverse;
        align-items: center;
        gap: 15px;
    }

    .datetime-wrapper {
        text-align: center;
    }

    .clock {
        font-size: 2rem;
    }

    .title {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 8px;
    }

    .btn-grid {
        grid-template-columns: 1fr;
    }

    .floating-circle {
        filter: blur(60px);
    }

    .c1 { width: 250px; height: 250px; }
    .c2 { width: 200px; height: 200px; }
    .c3 { width: 180px; height: 180px; }
}

@media (max-width: 480px) {
    .clock {
        font-size: 1.8rem;
    }

    .title {
        font-size: 1.3rem;
    }

    .group {
        padding: 15px;
    }

    .btn {
        padding: 14px 16px;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}

/* Selection */
::selection {
    background: var(--accent);
    color: white;
}
