:root {
    --brand-primary: #030b16;
    --brand-bg-alt: #081a2c;
    --brand-panel: rgba(8, 28, 48, 0.5);
    --brand-panel-border: rgba(129, 226, 255, 0.14);
    --brand-text: #e9f4ff;
    --brand-accent: #00c4ff;
    --brand-accent-glow: rgba(0, 196, 255, 0.28);
    --brand-highlight: #1cd5df;
}

body {
    margin: 0;
    font-family: 'Roboto', -apple-system, sans-serif;
    color: var(--brand-text);
    background: radial-gradient(140% 120% at 20% -10%, rgba(22, 118, 189, 0.5), rgba(4, 17, 32, 0.98)),
                linear-gradient(160deg, var(--brand-primary), var(--brand-bg-alt) 48%, var(--brand-primary));
    min-height: 100vh;
}

.brand-shell {
    display: flex;
    flex-direction: column;
}

.brand-header {
    position: relative;
    background: rgba(7, 22, 36, 0.85);
    border-bottom: 1px solid var(--brand-panel-border);
    backdrop-filter: blur(16px);
    overflow: hidden;
    min-height: 72px;
    display: flex;
    align-items: center;
}

.brand-glow {
    position: absolute;
    inset: -140px;
    background: radial-gradient(circle at 20% 40%, rgba(0, 196, 255, 0.28), transparent 65%);
    pointer-events: none;
    transform: rotate(8deg);
}

.brand-toolbar {
    position: relative;
    z-index: 1;
    padding: 0 28px;
    width: 100%;
}

.brand-wordmark {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 10px 18px;
    border-radius: 18px;
    border: 1px solid var(--brand-panel-border);
    background: var(--brand-panel);
    transition: transform 180ms ease, border-color 180ms, background 180ms;
}

.brand-wordmark:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 196, 255, 0.35);
    background: rgba(8, 28, 48, 0.68);
}

.brand-name {
    font-size: 1.1rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    font-weight: 700;
}

.brand-tagline {
    font-size: 0.75rem;
    color: rgba(233, 244, 255, 0.78);
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.landing-page {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 48px 24px;
}

.landing-wrap {
    max-width: 800px;
    width: 100%;
}

.hero-card {
    position: relative;
    padding: 40px 48px;
    border-radius: 32px;
    background: rgba(5, 18, 32, 0.72);
    border: 1px solid var(--brand-panel-border);
    box-shadow: 0 28px 56px rgba(3, 18, 32, 0.65), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
    overflow: hidden;
    isolation: isolate;
    text-align: center;
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    transform: translateZ(0);
}

.hero-card__halo {
    position: absolute;
    inset: -120px;
    background: radial-gradient(circle at 50% 0%, rgba(0, 196, 255, 0.4), transparent 65%);
    z-index: -1;
    filter: blur(32px);
}

.hero-card__badge {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(129, 226, 255, 0.1);
    border: 1px solid rgba(129, 226, 255, 0.2);
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--brand-highlight);
    margin-bottom: 24px;
}

.hero-card h1 {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 12px;
}

.hero-card p {
    color: var(--brand-text);
    font-size: 1.1rem;
    margin-bottom: 32px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

/* --- Interactive Elements --- */

.upload-area {
    border: 2px dashed rgba(129, 226, 255, 0.4);
    border-radius: 20px;
    padding: 48px 32px;
    cursor: pointer;
    background: rgba(3, 11, 22, 0.5);
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    overflow: hidden;
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    transform: translateZ(0);
}

.upload-area:hover, .upload-area.dragover {
    border-color: var(--brand-highlight);
    background: rgba(28, 213, 223, 0.05);
    box-shadow: 0 0 20px rgba(28, 213, 223, 0.1);
}

.file-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.upload-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--brand-highlight);
    margin: 0;
}

.upload-subtext {
    font-size: 0.9rem;
    color: rgba(233, 244, 255, 0.6);
    margin: 8px 0 0;
}

.hidden {
    display: none !important;
}

.loading-state {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(129, 226, 255, 0.2);
    border-top-color: var(--brand-highlight);
    border-radius: 50%;
    margin: 0 auto 16px auto;
    animation: spin 1s linear infinite;
}

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

}

/* --- New Production Styles --- */

.brand-wordmark:hover {
    background: rgba(12, 34, 56, 0.6);
    border-color: rgba(129, 226, 255, 0.3);
    transform: translateY(-1px);
}

a.brand-wordmark, a.brand-wordmark:visited, a.brand-wordmark:active {
    color: inherit;
    text-decoration: none;
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    background: linear-gradient(90deg, #fff, rgba(255,255,255,0.7));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #fff; /* Fallback for browsers that don't support text-fill */
}

a.brand-wordmark:visited .brand-name {
    -webkit-text-fill-color: #fff; /* Visited links disable transparent text fills for privacy */
    color: #fff;
}

.hero-card h1 {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    margin: 0 0 16px;
    font-size: 3rem;
    letter-spacing: 0.02em;
    background: linear-gradient(180deg, #ffffff, #a5d8ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.upload-area {
    border: 2px dashed rgba(129, 226, 255, 0.4);
    border-radius: 20px;
    padding: 64px 32px;
    cursor: pointer;
    background: rgba(3, 11, 22, 0.5);
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    overflow: hidden;
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    transform: translateZ(0);
}

.upload-area:hover, .upload-area.dragover {
    border-color: var(--brand-highlight);
    background: rgba(28, 213, 223, 0.08);
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(28, 213, 223, 0.15), inset 0 0 0 1px rgba(255,255,255,0.05);
}

.upload-icon {
    font-size: 3.5rem;
    margin-bottom: 16px;
    transition: transform 0.3s ease;
}

.upload-area:hover .upload-icon {
    transform: scale(1.1) translateY(-5px);
}

.hidden {
    display: none !important;
    opacity: 0;
}

/* Results Panel */
.results-panel {
    margin-top: 32px;
    animation: slideUpFade 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

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

.success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: rgba(28, 213, 223, 0.15);
    border: 2px solid var(--brand-highlight);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--brand-highlight);
    box-shadow: 0 0 24px rgba(28, 213, 223, 0.4);
}

.results-title {
    font-family: 'Inter', sans-serif;
    color: #fff;
    margin-bottom: 24px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.stat-box {
    background: rgba(8, 28, 48, 0.4);
    border: 1px solid var(--brand-panel-border);
    border-radius: 16px;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-2px);
    background: rgba(8, 28, 48, 0.6);
}

.highlight-box {
    background: linear-gradient(135deg, rgba(28, 213, 223, 0.15), rgba(6, 58, 96, 0.4));
    border-color: rgba(28, 213, 223, 0.4);
    box-shadow: 0 8px 24px rgba(28, 213, 223, 0.15);
}

.stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(233, 244, 255, 0.7);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    color: #fff;
}

.highlight-value {
    color: var(--brand-highlight);
    text-shadow: 0 0 12px rgba(28, 213, 223, 0.4);
}

.reset-button {
    background: transparent;
    border: 1px solid var(--brand-highlight);
    color: var(--brand-highlight);
    padding: 12px 32px;
    border-radius: 999px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-button:hover {
    background: var(--brand-highlight);
    color: #011226;
    box-shadow: 0 0 24px rgba(28, 213, 223, 0.4);
}

.brand-footer {
    text-align: center;
    padding: 24px;
    font-size: 0.85rem;
    color: rgba(233, 244, 255, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(3, 11, 22, 0.8);
}
