@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-color: #0b0c10;
    --card-bg: rgba(30, 32, 40, 0.45);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    /* Neon Accents */
    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --secondary: #3b82f6;
    --success: #10b981;
    --danger: #f43f5e;
    
    --glass-blur: blur(16px);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    padding: 1rem;
    padding-top: max(1rem, env(safe-area-inset-top));
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    
    /* Premium dark mesh background */
    background-image: 
        radial-gradient(circle at 15% 10%, rgba(139, 92, 246, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 85% 90%, rgba(59, 130, 246, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.05) 0%, transparent 60%);
    background-attachment: fixed;
    overscroll-behavior-y: none;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

header {
    text-align: center;
    margin-bottom: 1.5rem;
    position: relative;
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #a78bfa 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

.user-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Glassmorphism Cards */
.user-card {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 1.75rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.user-card:hover {
    transform: translateY(-4px) scale(1.01);
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4),
                0 0 20px rgba(139, 92, 246, 0.1);
}

.user-info h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Toggle Switch Premium */
.switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 30px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255,255,255,0.1);
    transition: .4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 34px;
    border: 1px solid rgba(255,255,255,0.05);
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 3px;
    background-color: white;
    transition: .4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

input:checked + .slider {
    background: linear-gradient(135deg, var(--success), #34d399);
    border-color: transparent;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Premium Buttons */
.btn {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.9rem;
    backdrop-filter: blur(4px);
}

.btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover), #2563eb);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
    transform: translateY(-2px);
}

/* Time display box */
.time-box {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.1);
}

/* Select element styling */
select {
    appearance: none;
    background: rgba(255,255,255,0.05);
    color: white;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 0.5rem 2rem 0.5rem 1rem;
    border-radius: 10px;
    font-family: 'Outfit', sans-serif;
    outline: none;
    cursor: pointer;
}

select option {
    background: var(--bg-color);
    color: white;
}

/* Modals */
.modal-overlay {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

.modal-content {
    background: rgba(20, 22, 30, 0.95); /* Removido backdrop-filter para evitar glitches em mobile */
    border: 1px solid var(--card-border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5),
                0 0 30px rgba(139, 92, 246, 0.15);
    max-height: 90vh;
    overflow-y: auto;
}

input[type="text"], input[type="number"] {
    font-family: 'Outfit', sans-serif;
}

input:focus {
    outline: 2px solid var(--primary);
    border-color: transparent !important;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
}
::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.3);
}

@media (max-width: 700px) {
    body {
        padding: 1rem;
        padding-top: max(1rem, env(safe-area-inset-top));
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
    }

    header {
        margin-bottom: 1.5rem;
    }

    header h1 {
        font-size: 1.6rem;
    }
    
    .user-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1.25rem 1.5rem;
    }
    
    .controls {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }
    
    .modal-content {
        padding: 1.25rem !important;
        width: 95% !important;
    }
    
    .modal-content h2 {
        font-size: 1.25rem !important;
    }
    
    .modal-content p, .modal-content label, .modal-content span {
        font-size: 0.85rem !important;
    }
}

/* Report tabs */
.report-tab {
    background: transparent;
    border: none;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.report-tab.active {
    background: var(--primary) !important;
    color: white !important;
    font-weight: 600;
}
