@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=Outfit:wght@400;500;700;900&display=swap');

:root {
    --bg-primary: #02040a;
    --bg-secondary: #0f172a;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-blue: #3b82f6;
    --accent-cyan: #06b6d4;
    --border-color: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Manrope', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
}

/* Animated Background */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.background-animation::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at top, #0f172a 0%, #020617 50%, #000 100%);
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.07;
    animation: float 20s ease-in-out infinite;
}

.shape-1 { width: 400px; height: 400px; background: var(--accent-blue); top: 10%; left: 10%; animation-delay: 0s; }
.shape-2 { width: 300px; height: 300px; background: var(--accent-cyan); top: 60%; right: 10%; animation-delay: -5s; }
.shape-3 { width: 250px; height: 250px; background: var(--accent-blue); bottom: 20%; left: 30%; animation-delay: -10s; }
.shape-4 { width: 200px; height: 200px; background: var(--accent-cyan); top: 30%; right: 30%; animation-delay: -15s; }
.shape-5 { width: 350px; height: 350px; background: var(--accent-blue); bottom: 10%; right: 20%; animation-delay: -7s; }
.shape-6 { width: 180px; height: 180px; background: var(--accent-cyan); top: 5%; right: 5%; animation-delay: -12s; }

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(30px, -30px) rotate(5deg); }
    50% { transform: translate(-20px, 20px) rotate(-5deg); }
    75% { transform: translate(20px, 30px) rotate(3deg); }
}

/* Header */
.header {
    position: relative;
    z-index: 10;
    padding: 20px;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.logo-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-placeholder svg {
    width: 24px;
    height: 24px;
    color: white;
}

.logo span {
    font-size: 20px;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
}

.admin-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.admin-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.admin-link svg {
    width: 16px;
    height: 16px;
}

/* Main Content */
.main-content {
    position: relative;
    z-index: 10;
    padding: 40px 20px 80px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

.title-section {
    text-align: center;
    margin-bottom: 60px;
}

.title-section h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-section p {
    font-size: 18px;
    color: var(--text-secondary);
}

/* Buttons Grid */
.buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.system-button {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    padding: 30px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.system-button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px -20px rgba(59, 130, 246, 0.3);
}

.button-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), transparent, rgba(6, 182, 212, 0.1));
    opacity: 0;
    transition: opacity 0.5s;
}

.system-button:hover .button-glow {
    opacity: 1;
}

.button-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.button-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.system-button:hover .button-icon {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
}

.button-icon svg {
    width: 32px;
    height: 32px;
    color: var(--accent-blue);
    transition: color 0.3s;
}

.system-button:hover .button-icon svg {
    color: #93c5fd;
}

.button-name {
    font-size: 20px;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    text-align: center;
}

.button-action {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-secondary);
    transition: color 0.3s;
}

.system-button:hover .button-action {
    color: var(--text-primary);
}

.button-action svg {
    width: 14px;
    height: 14px;
}

.button-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.05) 45%, transparent 50%);
    transform: translateX(-100%);
    transition: transform 0.8s;
}

.system-button:hover .button-shine {
    transform: translateX(100%);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.empty-icon svg {
    width: 64px;
    height: 64px;
    color: #475569;
    margin-bottom: 16px;
}

.empty-state p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state small {
    color: #64748b;
}

/* Footer */
.footer {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 30px 20px;
    color: #64748b;
    font-size: 14px;
}

/* Typewriter cursor animation */
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.typewriter-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--accent-blue);
    margin-left: 4px;
    vertical-align: middle;
    animation: blink 0.7s step-end infinite;
}

.typewriter-cursor.complete {
    animation: blink 1.5s ease-in-out infinite;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 16px;
    }
    
    .title-section h1 {
        font-size: 2rem;
    }
    
    .buttons-grid {
        grid-template-columns: 1fr;
    }
    
    .system-button {
        height: 180px;
    }
}

/* Admin Styles */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.admin-tab {
    padding: 10px 20px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-tab:hover, .admin-tab.active {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
}

.admin-tab svg {
    width: 18px;
    height: 18px;
}

.glass-card {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 14px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-primary);
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-blue);
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.3);
}

.btn svg {
    width: 18px;
    height: 18px;
}

.button-list-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    margin-bottom: 12px;
    transition: background 0.3s;
}

.button-list-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.button-list-item .icon-box {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.button-list-item .icon-box svg {
    width: 20px;
    height: 20px;
    color: var(--accent-blue);
}

.button-list-item .info {
    flex: 1;
}

.button-list-item .info h4 {
    font-size: 16px;
    margin-bottom: 4px;
}

.button-list-item .info p {
    font-size: 13px;
    color: var(--text-secondary);
}

.button-list-item .actions {
    display: flex;
    gap: 8px;
}

.toggle-switch {
    position: relative;
    width: 48px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 13px;
    transition: 0.3s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--accent-blue);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(22px);
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-color);
}

.stat-card .stat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.stat-card .stat-header .stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(59, 130, 246, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-card .stat-header .stat-icon svg {
    width: 18px;
    height: 18px;
    color: var(--accent-blue);
}

.stat-card .stat-header span {
    font-size: 14px;
    color: var(--text-secondary);
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
}

.stat-card .stat-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    margin-top: 12px;
    overflow: hidden;
}

.stat-card .stat-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
    border-radius: 3px;
}

/* Access Logs */
.log-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    margin-bottom: 8px;
}

.log-item .log-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    margin-right: 12px;
}

.log-item .log-name {
    flex: 1;
    font-weight: 500;
}

.log-item .log-time {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header .login-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.login-header .login-icon svg {
    width: 30px;
    height: 30px;
    color: var(--accent-blue);
}

.login-header h1 {
    font-size: 24px;
    margin-bottom: 8px;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

.error-message {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 20px;
    transition: color 0.3s;
}

.back-link:hover {
    color: var(--text-primary);
}

.back-link svg {
    width: 16px;
    height: 16px;
}
