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

:root {
    --bg-color: #0b0c10;
    --card-bg: rgba(25, 28, 36, 0.6);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --primary-color: #7c3aed;
    --primary-glow: rgba(124, 58, 237, 0.4);
    --secondary-color: #06b6d4;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --font-family: 'Outfit', sans-serif;
    --glass-blur: blur(16px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(at 10% 20%, rgba(124, 58, 237, 0.15) 0px, transparent 50%),
        radial-gradient(at 90% 80%, rgba(6, 182, 212, 0.12) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-family);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Header & Typography */
header {
    padding: 2.5rem 1rem;
    text-align: center;
    position: relative;
    z-index: 10;
}

h1 {
    font-size: 2.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #a78bfa 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
    text-transform: uppercase;
}

p.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
}

/* Main Container */
main {
    flex: 1;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem 3rem 1.5rem;
    position: relative;
    z-index: 10;
}

/* Glass Card Component */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 2.5rem;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 25px 50px rgba(124, 58, 237, 0.1);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.8rem;
    position: relative;
}

label {
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
    letter-spacing: 0.02em;
}

/* Search Bar Wrapper */
.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

input[type="text"], 
input[type="password"],
input[type="tel"],
select {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 1rem 1.2rem;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 1.05rem;
    font-weight: 400;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

input[type="text"]:focus, 
input[type="password"]:focus,
input[type="tel"]:focus,
select:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

/* Garante legibilidade das opções do select (filme/série/canal) em tema escuro */
select option {
    background-color: #1a1c24;
    color: var(--text-primary);
}

/* Autocomplete Results Box */
.autocomplete-box {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #141722;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    max-height: 280px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
    display: none;
}

.autocomplete-item {
    padding: 0.9rem 1.2rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background: rgba(124, 58, 237, 0.15);
}

.item-name {
    font-weight: 500;
    color: var(--text-primary);
}

.item-group {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 14px;
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #ffffff;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #6366f1 100%);
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.45);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.14);
}

/* Status Notifications */
.status-container {
    margin-top: 1.5rem;
    display: none;
    border-radius: 14px;
    padding: 1.2rem;
    font-weight: 500;
    align-items: center;
    gap: 0.8rem;
    animation: fadeIn 0.4s ease;
}

.status-success {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success-color);
}

.status-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger-color);
}

.status-warning {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--warning-color);
}

/* Request Form Section */
#request-section {
    display: none;
    animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Loader Spinner */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--text-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
    margin-left: 10px;
}

/* Footer */
footer {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: auto;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

/* ADMIN PANEL STYLES */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
}

.admin-header-actions {
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning-color);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-added {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-refused {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-exists {
    background: rgba(6, 182, 212, 0.15);
    color: var(--secondary-color);
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge-notfound {
    background: rgba(156, 163, 175, 0.15);
    color: #9ca3af;
    border: 1px solid rgba(156, 163, 175, 0.3);
}

/* Admin Dashboard Table/Grid */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th, td {
    padding: 1rem 1.2rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

th {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.01);
}

/* Action Dropdown / Buttons in Admin */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border-radius: 8px;
    width: auto;
}

.btn-success {
    background: var(--success-color);
}
.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: var(--danger-color);
}
.btn-danger:hover {
    background: #dc2626;
}

/* Statistics row */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.2rem;
    text-align: center;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--secondary-color);
    margin-top: 0.3rem;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Login Page Container */
.login-card {
    max-width: 420px;
    margin: 4rem auto;
}

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

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

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

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

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Media Queries */
@media (max-width: 768px) {
    h1 {
        font-size: 2.2rem;
    }
    
    .card {
        padding: 1.5rem;
        border-radius: 20px;
    }

    th, td {
        padding: 0.8rem;
    }

    .admin-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-header-actions {
        width: 100%;
        justify-content: space-between;
    }
}

/* Category Filters styling */
.filter-container {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 15px;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

.filter-btn.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 0 12px var(--primary-glow);
}

/* Voice Search Button styling */
.voice-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    margin-left: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.voice-btn:hover {
    color: var(--primary-color);
    background: rgba(124, 58, 237, 0.1);
}

.voice-btn.recording {
    color: var(--danger-color);
    background: rgba(239, 68, 68, 0.15);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { transform: scale(1.08); box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Trending requests list styling */
.trending-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
    gap: 12px;
}

.trending-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.vote-badge {
    font-size: 0.75rem;
    background: rgba(6, 182, 212, 0.15);
    color: var(--secondary-color);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-weight: 700;
}

.btn-vote {
    background: rgba(124, 58, 237, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(124, 58, 237, 0.2);
    padding: 0.4rem 0.9rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-vote:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-glow);
}

/* Light Theme Variables and overrides */
body.light-theme {
    --bg-color: #f3f4f6;
    --card-bg: rgba(255, 255, 255, 0.85);
    --card-border: rgba(0, 0, 0, 0.08);
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --primary-color: #6d28d9;
    --primary-glow: rgba(109, 40, 217, 0.15);
}

body.light-theme {
    background-image: 
        radial-gradient(at 10% 20%, rgba(109, 40, 217, 0.08) 0px, transparent 50%),
        radial-gradient(at 90% 80%, rgba(6, 182, 212, 0.06) 0px, transparent 50%);
}

body.light-theme .card {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.03);
}

body.light-theme .card:hover {
    box-shadow: 0 15px 30px rgba(109, 40, 217, 0.05);
}

body.light-theme .autocomplete-box {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

body.light-theme .autocomplete-item {
    border-bottom-color: rgba(0, 0, 0, 0.04);
}

body.light-theme .autocomplete-item:hover {
    background: rgba(109, 40, 217, 0.06);
}

body.light-theme input[type="text"],
body.light-theme input[type="password"],
body.light-theme select {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
    color: #111827;
}

body.light-theme input[type="text"]:focus,
body.light-theme input[type="password"]:focus,
body.light-theme select:focus {
    background: #ffffff;
    border-color: var(--primary-color);
}

body.light-theme select option {
    background-color: #ffffff;
    color: #111827;
}

body.light-theme .filter-btn {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.05);
    color: #4b5563;
}

body.light-theme .filter-btn:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #111827;
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .filter-btn.active {
    background: var(--primary-color);
    color: #fff;
}

body.light-theme .trending-item {
    background: rgba(0, 0, 0, 0.01);
    border-color: rgba(0, 0, 0, 0.04);
}

body.light-theme .trending-item:hover {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.06);
}

body.light-theme th {
    background: rgba(0, 0, 0, 0.02);
    color: #4b5563;
}

body.light-theme td {
    border-bottom-color: rgba(0, 0, 0, 0.04);
}

body.light-theme tr:hover {
    background: rgba(0, 0, 0, 0.01);
}

/* Estilo dos cards do Top 10 */
.top-card {
    position: relative;
    flex: 0 0 160px; /* Largura fixa do card */
    height: 240px; /* Altura do card (proporção de poster vertical) */
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(30, 30, 45, 0.75) 0%, rgba(15, 15, 20, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1rem;
    box-sizing: border-box;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease, box-shadow 0.3s ease;
    cursor: default;
}
.top-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(6, 182, 212, 0.1) 0%, transparent 60%);
    z-index: 1;
}
/* Gradiente escuro para garantir leitura do texto por cima da imagem */
.top-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(10, 10, 15, 0.95) 0%, rgba(10, 10, 15, 0.45) 50%, rgba(10, 10, 15, 0.1) 100%);
    z-index: 2;
}
.top-card:hover {
    transform: translateY(-6px);
    border-color: var(--secondary-color);
    box-shadow: 0 8px 24px rgba(6, 182, 212, 0.25);
}
.top-number {
    position: absolute;
    bottom: -15px;
    left: -12px;
    font-size: 7.5rem;
    font-weight: 900;
    line-height: 1;
    font-family: 'Outfit', sans-serif;
    color: rgba(255, 255, 255, 0.08);
    -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.35);
    z-index: 3; /* Acima do gradiente escuro */
    pointer-events: none;
    transition: color 0.3s ease, -webkit-text-stroke 0.3s ease;
}
.top-card:hover .top-number {
    color: rgba(6, 182, 212, 0.15);
    -webkit-text-stroke: 1.5px var(--secondary-color);
}
.top-content {
    position: relative;
    z-index: 4; /* Acima do número e do gradiente */
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-align: left;
    margin-left: 20px; /* Dá espaço para o número gigante */
}
.top-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}
.top-sub {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

body.light-theme .top-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(240, 240, 245, 0.95) 100%);
    border-color: rgba(0, 0, 0, 0.06);
}
body.light-theme .top-card::after {
    background: linear-gradient(to top, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.45) 50%, rgba(255, 255, 255, 0.1) 100%);
}
body.light-theme .top-number {
    color: rgba(0, 0, 0, 0.04);
    -webkit-text-stroke: 1.5px rgba(0, 0, 0, 0.2);
}
body.light-theme .top-card:hover .top-number {
    color: rgba(6, 182, 212, 0.08);
}
body.light-theme .top-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}




