/* ===========================================
   EXAME.ONLINE - Sistema de Análise de Exames
   =========================================== */

/* CSS Variables */
:root {
    --primary: #00d4aa;
    --primary-dark: #00a88a;
    --primary-light: #4de8c7;
    --secondary: #667eea;
    --accent: #764ba2;
    --bg-dark: #0a1628;
    --bg-card: #0f2035;
    --bg-modal: rgba(10, 22, 40, 0.95);
    --text-primary: #ffffff;
    --text-secondary: #a0b4c8;
    --text-muted: #6b7c8f;
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;
    --border: rgba(102, 126, 234, 0.2);
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --gradient-accent: linear-gradient(135deg, var(--secondary) 0%, var(--accent) 100%);
}

/* Reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-light);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===========================================
   HEADER
   =========================================== */
.header {
    background: rgba(10, 22, 40, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* ===========================================
   HERO SECTION
   =========================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('./icons/bg.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.2;
    /* ajuste conforme necessário */
    z-index: 2;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(0, 212, 170, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(118, 75, 162, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 3;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 3;
    max-width: 800px;
    padding: 0 1rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 212, 170, 0.1);
    border: 1px solid rgba(0, 212, 170, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 0%, var(--primary) 50%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* CTA Button */
.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--gradient-primary);
    color: #000;
    padding: 1.25rem 2.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 212, 170, 0.3);
    animation: pulse 2s infinite;
}

.btn-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 212, 170, 0.4);
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }
}

/* ===========================================
   FEATURES SECTION
   =========================================== */
.features {
    padding: 80px 0;
    background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-card) 100%);
}

.section-title {
    text-align: center;
    font-size: 2.25rem;
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.feature-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;

    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ===========================================
   HOW IT WORKS
   =========================================== */
.how-it-works {
    padding: 80px 0;
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.step {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.step-number {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 800;
    color: #000;
}

.step-content h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.step-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ===========================================
   PRICING SECTION
   =========================================== */
.pricing {
    padding: 80px 0;
    background: var(--bg-card);
}

.price-card {
    max-width: 400px;
    margin: 0 auto;
    background: var(--bg-dark);
    border: 2px solid var(--primary);
    border-radius: 24px;
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.price-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.price-value {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
    margin: 1.5rem 0;
}

.price-currency {
    font-size: 1.5rem;
    color: var(--text-secondary);
}

.price-amount {
    font-size: 4rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.price-period {
    font-size: 1rem;
    color: var(--text-muted);
}

.price-features {
    list-style: none;
    margin: 2rem 0;
    text-align: left;
}

.price-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

.price-features li:last-child {
    border-bottom: none;
}

.price-features .check {
    color: var(--success);
    font-size: 1.25rem;
}

/* ===========================================
   FOOTER
   =========================================== */
.footer {
    background: var(--bg-dark);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    text-align: center;
}

.footer p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ===========================================
   MODALS
   =========================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-modal);
    z-index: 2000;
    backdrop-filter: blur(8px);
    overflow-y: auto;
    padding: 1rem;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.25rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 1rem;
}

/* ===========================================
   UPLOAD SECTION
   =========================================== */
.upload-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.upload-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 2rem 1rem;
    background: rgba(102, 126, 234, 0.1);
    border: 2px dashed var(--border);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: var(--secondary);
}

.upload-btn .icon {
    font-size: 2.5rem;
}

.upload-btn span {
    font-weight: 600;
    color: var(--text-secondary);
}

/* Image Preview */
.images-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.image-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--border);
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview-item .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: var(--error);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.image-count {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 1rem;
}

/* Gender Selection */
.gender-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}

.gender-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 2rem 1rem;
    background: rgba(102, 126, 234, 0.1);
    border: 2px solid var(--border);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.gender-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: var(--secondary);
    transform: translateY(-3px);
}

.gender-btn.selected {
    background: rgba(0, 212, 170, 0.2);
    border-color: var(--primary);
}

.gender-icon {
    font-size: 3rem;
}

.gender-label {
    font-weight: 600;
    font-size: 1rem;
}

/* ===========================================
   FORM STYLES
   =========================================== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.2);
}

.form-input::placeholder {
    color: var(--text-muted);
}

/* ===========================================
   BUTTONS
   =========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #000;
    flex: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 212, 170, 0.3);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-secondary);
}

/* Loading Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 0, 0, 0.3);
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Loading Progress */
.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 3px;
    width: 0%;
    transition: width 0.5s ease;
    animation: progressPulse 2s ease-in-out infinite;
}

@keyframes progressPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.loading-step {
    animation: fadeInOut 0.5s ease;
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translateY(5px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===========================================
   RESULT SECTION
   =========================================== */
.result-container {
    padding: 2rem;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.result-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.result-content {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    line-height: 1.8;
    max-height: 60vh;
    overflow-y: auto;
}

.result-content h2 {
    color: var(--primary);
    font-size: 1.3rem;
    margin: 1.5rem 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.result-content h2:first-child {
    margin-top: 0;
}

.result-content h3 {
    color: var(--primary-light);
    font-size: 1.15rem;
    margin: 1.25rem 0 0.5rem;
}

.result-content h4 {
    color: var(--text-primary);
    font-size: 1.05rem;
    margin: 1rem 0 0.5rem;
}

.result-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.result-content em {
    color: var(--text-secondary);
    font-style: italic;
}

.result-p {
    margin-bottom: 1rem;
}

.result-list {
    list-style: none;
    padding-left: 0;
    margin: 0.75rem 0;
}

.result-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.result-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

.result-h2 {
    color: var(--primary) !important;
    font-size: 1.3rem !important;
    margin: 1.5rem 0 0.75rem !important;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.result-h3 {
    color: var(--primary-light) !important;
    font-size: 1.15rem !important;
    margin: 1.25rem 0 0.5rem !important;
}

.result-h4 {
    color: var(--text-primary) !important;
    font-size: 1.05rem !important;
    margin: 1rem 0 0.5rem !important;
}

.result-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.btn-download {
    background: var(--success);
    color: white;
}

.btn-whatsapp {
    background: #25D366;
    color: white;
}

/* ===========================================
   PAYMENT SECTION
   =========================================== */
.payment-container {
    text-align: center;
}

.qr-section {
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    display: inline-block;
    margin: 1.5rem 0;
}

.qr-section img {
    width: 200px;
    height: 200px;
}

.pix-code {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    font-family: monospace;
    font-size: 0.75rem;
    word-break: break-all;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.payment-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(0, 123, 255, 0.1);
    border: 1px solid rgba(0, 123, 255, 0.3);
    border-radius: 12px;
    margin-top: 1.5rem;
}

.payment-status.success {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
}

.status-dot {
    width: 10px;
    height: 10px;
    background: #007bff;
    border-radius: 50%;
    animation: blink 1.5s ease-in-out infinite;
}

.status-dot.success {
    background: var(--success);
    animation: none;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

/* ===========================================
   ERROR & SUCCESS MESSAGES
   =========================================== */
.message {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.message-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--error);
}

.message-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: var(--success);
}

/* ===========================================
   RESPONSIVE
   =========================================== */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .btn-cta {
        padding: 1rem 2rem;
        font-size: 1rem;
    }

    .upload-options {
        grid-template-columns: 1fr;
    }

    .result-actions {
        grid-template-columns: 1fr;
    }

    .modal-content {
        margin: 0.5rem;
        border-radius: 16px;
    }

    .modal-body {
        padding: 1.5rem;
    }
}

/* ===========================================
   UTILITIES
   =========================================== */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.hidden {
    display: none !important;
}

/* ===========================================
   PWA INSTALL BANNER
   =========================================== */
.pwa-install-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 1rem;
    z-index: 3000;
    animation: slideInUp 0.3s ease;
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.pwa-install-content {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pwa-install-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.pwa-install-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.pwa-install-text strong {
    color: var(--text-primary);
    font-size: 0.95rem;
}

.pwa-install-text span {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.pwa-install-button {
    background: var(--gradient-primary);
    color: #000;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.pwa-install-button:hover {
    transform: scale(1.05);
}

.pwa-install-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    flex-shrink: 0;
}

.pwa-install-close:hover {
    color: var(--text-primary);
}

@media (max-width: 480px) {
    .pwa-install-content {
        flex-wrap: wrap;
    }

    .pwa-install-button {
        width: 100%;
        margin-top: 0.5rem;
    }
}