:root {
    --primary: #9d50bb;
    --accent: #6e48aa;
    --accent-glow: rgba(139, 92, 246, 0.4);
    --bg-dark: #070709;
    --cyan: #06B6D4;
    --text-primary: #F8F9FA;
    --text-secondary: #94A3B8;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --success: #10B981;
    --danger: #EF4444;
}

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

.hidden { display: none !important; }

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.aurora-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 10% 20%, rgba(157, 80, 187, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(110, 72, 170, 0.05) 0%, transparent 70%);
    z-index: -1;
    filter: blur(100px);
    animation: aurora-shift 20s infinite alternate ease-in-out;
}

@keyframes aurora-shift {
    0% { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.1) translate(2%, 2%); }
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: rgba(7, 7, 9, 0.7);
    backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: var(--text-primary);
}

.logo img {
    height: 40px;
    width: auto;
    filter: drop-shadow(0 0 10px var(--accent-glow));
}

.logo span {
    font-weight: 800;
    letter-spacing: 2px;
    font-size: 1.2rem;
    background: linear-gradient(90deg, #fff, var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary);
    text-shadow: 0 0 8px var(--accent-glow);
}

/* Layout Containers */
.dashboard-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.main-results {
    display: none; /* Ativado via JS */
    grid-template-columns: 1fr 1.2fr;
    gap: 2.5rem;
    margin-top: 2rem;
    align-items: start;
    width: 100%;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Glass Card System */
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    backdrop-filter: blur(12px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6);
}

.glass-card.admin-panel {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 4rem;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

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

/* Upload Section */
.upload-section {
    max-width: 800px;
    margin: 2rem auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.drop-zone {
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 3rem;
    transition: all 0.3s ease;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.01);
}

.drop-zone.dragover {
    border-color: var(--primary);
    background: rgba(157, 80, 187, 0.05);
    transform: scale(1.02);
}

.upload-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.btn-secondary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1.5rem;
    font-family: inherit;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(157, 80, 187, 0.3);
}

.section-badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(157, 80, 187, 0.1);
    border: 1px solid rgba(157, 80, 187, 0.2);
    border-radius: 100px;
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.spec-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.image-placeholder {
    background: rgba(255, 255, 255, 0.02);
    border: 2px dashed rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 5rem 2rem;
    text-align: center;
    color: var(--text-secondary);
    width: 100%;
    transition: all 0.4s ease;
}

.image-placeholder.loaded {
    border: none;
    padding: 0;
    background: transparent;
}

/* Results Components */
.result-display {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 450px;
    position: relative;
}

.confidence-circle {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 0 auto 2rem;
}

.confidence-circle svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.confidence-circle circle {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
}

.confidence-circle .circle-bg {
    stroke: rgba(255, 255, 255, 0.05);
}

.confidence-circle .progress {
    stroke: var(--primary);
    stroke-width: 4;
    filter: drop-shadow(0 0 8px var(--accent-glow));
    transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.5s ease;
    stroke-linecap: round;
}

.verdict-explanation {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 500;
    min-height: 1.4em;
    opacity: 0.8;
    max-width: 80%;
}

.confidence-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

#confidence-value {
    display: block;
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(135deg, #fff, var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.confidence-text span:last-child {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.verdict-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 28px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 100px;
    border: 1px solid var(--glass-border);
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.pulse {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 15px var(--primary);
}

#verdict-text {
    font-weight: 700;
    letter-spacing: 0.5px;
    font-size: 1.1rem;
}

/* Spectrogram Specific */
.spectrogram-view {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.spectrogram-view h4 {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

/* XAI Heatmap */
.spec-wrapper {
    position: relative;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    background: #000;
}

.spec-wrapper img {
    display: block;
    width: 100%;
    height: auto;
}

.heatmap-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 12px;
    display: flex;
    pointer-events: none;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.2);
}

.heatmap-segment {
    flex: 1;
    height: 100%;
    transition: all 0.6s ease;
}

/* Diagnostics */
.diagnostic-container {
    margin-top: 1.5rem;
}

.diagnostic-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0 1.5rem;
}

.btn-mini {
    background: rgba(157, 80, 187, 0.1);
    border: 1px solid rgba(157, 80, 187, 0.2);
    color: var(--primary);
    padding: 10px 24px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-mini:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 15px var(--accent-glow);
    transform: translateY(-2px);
}

.engine-stat {
    margin-bottom: 1.5rem;
}

.engine-stat label {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.6rem;
}

.progress-mini {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

.progress-mini .bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--cyan));
    width: 0%;
    transition: width 1.2s ease;
}

/* Footer */
.glass-footer {
    padding: 3rem 5%;
    margin-top: auto;
    border-top: 1px solid var(--glass-border);
    background: rgba(7, 7, 9, 0.5);
    backdrop-filter: blur(10px);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    margin-left: 20px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: #121214;
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    max-width: 800px;
    width: 90%;
    padding: 3rem;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.step-card {
    text-align: center;
}

.step-number {
    font-size: 3rem;
    font-weight: 900;
    opacity: 0.1;
    margin-bottom: -2rem;
}

.step-icon {
    color: var(--primary);
    margin-bottom: 1rem;
}

/* Admin Specific Styles */
.admin-login-container {
    max-width: 450px;
    margin: 10vh auto;
    width: 100%;
}

.admin-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    padding: 3rem;
    backdrop-filter: blur(15px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.6rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    color: white;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(157, 80, 187, 0.15);
}

.progress-bar-container {
    width: 100%;
    height: 12px;
    background: rgba(0,0,0,0.4);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 1.2rem;
    border: 1px solid var(--glass-border);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--cyan));
    width: 0%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.status-text {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.section-title-admin {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff, var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-desc-admin {
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.admin-drop {
    margin-bottom: 2rem;
    border-color: rgba(255, 255, 255, 0.05);
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Mobile Responsive */
@media (max-width: 968px) {
    .main-results {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .dashboard-container {
        padding: 0 1rem;
        margin: 1.5rem auto;
    }
}

