:root {
    --primary-green: #2ecc71;
    --primary-green-hover: #27ae60;
    --background-black: #000000;
    --card-bg: #111111;
    --text-white: #FFFFFF;
    --text-gray: #898989;
    --border-color: #222222;
    --overlay: rgba(0, 0, 0, 0.7);
    --transition: all 0.3s ease;
    --radius: 12px;
}

.full-width {
    width: 100%;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--background-black);
    color: var(--text-white);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-prefix {
    color: var(--text-white);
}

.separator {
    color: var(--text-gray);
}

.brand-logo {
    height: 22px;
    width: auto;
    display: block;
}

.product-name {
    color: var(--primary-green);
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.nav-link {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-green);
}

/* Main Content */
.main {
    padding-top: 60px;
    min-height: calc(100vh - 80px);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 40px 0 80px;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 20px;
    font-weight: 700;
}

.highlight {
    color: var(--primary-green);
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-gray);
    max-width: 700px;
    margin: 0 auto 40px;
}

/* Upload Zone */
.upload-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 60px 40px;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius);
    background: var(--card-bg);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.upload-container:hover,
.upload-container.drag-over {
    border-color: var(--primary-green);
    box-shadow: 0 0 30px rgba(46, 204, 113, 0.3);
    transform: translateY(-5px);
}

.upload-icon {
    font-size: 3rem;
    color: var(--primary-green);
    margin-bottom: 20px;
}

.upload-content h3 {
    margin-bottom: 10px;
}

.upload-content p {
    color: var(--text-gray);
}

/* Processing State */
.processing {
    margin-top: 40px;
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(131, 188, 87, 0.1);
    border-top: 3px solid var(--primary-green);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Results Dashboard */
.results {
    padding-bottom: 80px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.full-width {
    grid-column: span 2;
}

.scorecard-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.score-header {
    margin-bottom: 20px;
}

.total-rating {
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary-green);
    margin: 10px 0;
}

.stars {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
}

.star {
    font-size: 1.5rem;
    color: #ffd700;
}

.star.empty {
    color: var(--border-color);
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.info-item:last-child {
    border-bottom: none;
}

.info-item .label {
    color: var(--text-gray);
}

.info-item .value {
    font-weight: 700;
    color: var(--primary-green);
}

/* Checklist */
.checklist {
    list-style: none;
    margin-top: 20px;
}

.checklist li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.checklist li i {
    width: 20px;
}

.fa-check-circle {
    color: var(--primary-green);
}

.fa-times-circle {
    color: #ff4d4d;
}

/* Feedback Grid */
.feedback-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0 30px;
}

.feedback-item {
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border-left: 4px solid var(--primary-green);
}

.feedback-item h4 {
    margin-bottom: 10px;
    color: var(--primary-green);
}

/* Upsell Section */
.upsell-container {
    margin-top: 50px;
    margin-bottom: 40px;
    border-top: 1px solid var(--border-color);
    padding-top: 50px;
    width: 100%;
}

.upsell-card {
    background: linear-gradient(145deg, #111, #0a0a0a);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid rgba(131, 188, 87, 0.3);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.upsell-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(131, 188, 87, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.upsell-badge {
    display: inline-block;
    padding: 6px 15px;
    background: var(--primary-green);
    color: black;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    border-radius: 20px;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.upsell-card h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.upsell-card p {
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto 30px;
    font-size: 1.1rem;
}

.upsell-features {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.u-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--text-white);
}

.u-feature i {
    color: var(--primary-green);
}

.upsell-btn {
    padding: 15px 40px;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

/* Button */
.btn {
    padding: 12px 30px;
    border-radius: 30px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-green);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-green-hover);
    transform: scale(1.05);
}

/* Footer */
.footer {
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    color: var(--text-gray);
}

/* Utils */
/* --- Analyst Note Styles --- */

.section-divider {
    border: 0;
    height: 1px;
    background: var(--border-color);
    margin: 40px 0;
}

.analyst-note-container {
    background: #ffffff;
    border-radius: 12px;
    padding: 60px;
    margin-top: 30px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid #e0e0e0;
    text-align: left;
    color: #333;
    /* Darker text for readability on white */
}

.note-header {
    margin-bottom: 40px;
    border-bottom: 2px solid #003366;
    /* Professional Navy */
    padding-bottom: 25px;
}

.note-badge {
    background: #003366;
    color: white;
    display: inline-block;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 15px;
}

.note-header h2 {
    font-size: 2.2rem;
    color: #002244;
    margin-bottom: 8px;
    font-weight: 700;
}

.note-meta {
    font-size: 0.95rem;
    color: #666;
    font-style: italic;
}

.note-section {
    margin-bottom: 45px;
}

.note-section h3 {
    font-size: 1.4rem;
    color: #003366;
    margin-bottom: 20px;
    border-left: 5px solid #003366;
    padding-left: 15px;
    font-weight: 700;
}

.note-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #2c3e50;
    white-space: pre-line;
}

.chart-container {
    margin: 25px 0;
    padding: 25px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    height: 350px;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.note-waiver {
    margin-top: 50px;
    padding: 25px;
    background: #f1f5f9;
    border-radius: 8px;
    border-left: 5px solid #cbd5e1;
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.6;
}

.note-actions {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.btn-secondary {
    background: #ffffff;
    color: #003366;
    border: 2px solid #003366;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.btn-secondary:hover {
    background: #003366;
    color: white;
    transform: translateY(-2px);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #003366;
    color: white;
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: 600;
    z-index: 3000;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* Print focus styles */
@media print {
    body * {
        visibility: hidden;
    }

    #analyst-note-container,
    #analyst-note-container * {
        visibility: visible;
    }

    #analyst-note-container {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        box-shadow: none;
        border: none;
        padding: 0;
    }

    .note-actions,
    .section-divider {
        display: none;
    }
}

.hidden {
    display: none !important;
}

/* PDF generation styles */
.temp-chart-img {
    display: block;
    max-width: 100%;
    height: auto;
}

.note-section {
    page-break-inside: avoid;
    break-inside: avoid;
}

.chart-container {
    page-break-inside: avoid;
    break-inside: avoid;
}

.note-waiver {
    page-break-inside: avoid;
    break-inside: avoid;
}

/* Base adjustment for full-width feedback items to accommodate Note */
.results .container {
    max-width: 1000px;
}

/* Responsive */
@media (max-width: 992px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .full-width {
        grid-column: span 1;
    }
}

@media (max-width: 600px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .upload-container {
        padding: 40px 20px;
    }
}