/* ========================================
   ANNUITY CALCULATOR - ART DECO LUXURY
   A distinctive design inspired by 1920s elegance
   ======================================== */

/* CSS Variables */
:root {
    /* Primary Palette - Deep Emerald & Antique Gold */
    --bg-primary: #0D1F17;
    --bg-secondary: #0A1812;
    --bg-tertiary: #132A1F;
    --bg-card: rgba(201, 162, 39, 0.03);
    --bg-card-hover: rgba(201, 162, 39, 0.08);

    /* Gold Spectrum */
    --gold-primary: #C9A227;
    --gold-light: #E8D48A;
    --gold-dark: #8B7019;
    --gold-glow: rgba(201, 162, 39, 0.25);
    --gold-subtle: rgba(201, 162, 39, 0.08);

    /* Emerald Accents */
    --emerald-light: #2D5A45;
    --emerald-bright: #4A9D7C;

    /* Text Colors */
    --text-primary: #F5F0E1;
    --text-secondary: #B8AF9A;
    --text-muted: #7A7464;
    --text-gold: var(--gold-primary);

    /* Borders & Lines */
    --border-color: rgba(201, 162, 39, 0.15);
    --border-gold: rgba(201, 162, 39, 0.4);
    --border-subtle: rgba(245, 240, 225, 0.08);

    /* Typography */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-elegant: 'Cormorant Garamond', Garamond, serif;
    --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --container-max: 1200px;
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    /* Transitions */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-fast: 200ms var(--ease-out-expo);
    --transition-base: 400ms var(--ease-out-expo);
    --transition-slow: 600ms var(--ease-out-expo);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   BACKGROUND EFFECTS
   ======================================== */

.bg-pattern {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 40px,
            rgba(201, 162, 39, 0.02) 40px,
            rgba(201, 162, 39, 0.02) 41px
        ),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 40px,
            rgba(201, 162, 39, 0.02) 40px,
            rgba(201, 162, 39, 0.02) 41px
        );
}

.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 100% 60% at 50% -10%, rgba(201, 162, 39, 0.08), transparent 50%),
        radial-gradient(ellipse 80% 50% at 100% 100%, rgba(45, 90, 69, 0.15), transparent 50%),
        radial-gradient(ellipse 60% 40% at 0% 50%, rgba(201, 162, 39, 0.05), transparent 50%);
}

/* Corner Ornaments */
.corner-ornament {
    position: fixed;
    width: 120px;
    height: 120px;
    pointer-events: none;
    z-index: 1;
    opacity: 0.3;
}

.corner-ornament::before,
.corner-ornament::after {
    content: '';
    position: absolute;
    background: var(--gold-primary);
}

.corner-ornament.top-left {
    top: 20px;
    left: 20px;
}
.corner-ornament.top-left::before {
    top: 0;
    left: 0;
    width: 60px;
    height: 1px;
}
.corner-ornament.top-left::after {
    top: 0;
    left: 0;
    width: 1px;
    height: 60px;
}

.corner-ornament.top-right {
    top: 20px;
    right: 20px;
}
.corner-ornament.top-right::before {
    top: 0;
    right: 0;
    width: 60px;
    height: 1px;
}
.corner-ornament.top-right::after {
    top: 0;
    right: 0;
    width: 1px;
    height: 60px;
}

.corner-ornament.bottom-left {
    bottom: 20px;
    left: 20px;
}
.corner-ornament.bottom-left::before {
    bottom: 0;
    left: 0;
    width: 60px;
    height: 1px;
}
.corner-ornament.bottom-left::after {
    bottom: 0;
    left: 0;
    width: 1px;
    height: 60px;
}

.corner-ornament.bottom-right {
    bottom: 20px;
    right: 20px;
}
.corner-ornament.bottom-right::before {
    bottom: 0;
    right: 0;
    width: 60px;
    height: 1px;
}
.corner-ornament.bottom-right::after {
    bottom: 0;
    right: 0;
    width: 1px;
    height: 60px;
}

/* ========================================
   CONTAINER
   ======================================== */

.container {
    position: relative;
    z-index: 2;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--space-xl);
}

/* ========================================
   HEADER
   ======================================== */

.header {
    text-align: center;
    padding: var(--space-3xl) 0 var(--space-2xl);
    position: relative;
}

.header-ornament {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.logo-diamond {
    width: 56px;
    height: 56px;
    color: var(--gold-primary);
    animation: diamondPulse 4s ease-in-out infinite;
}

@keyframes diamondPulse {
    0%, 100% {
        filter: drop-shadow(0 0 8px var(--gold-glow));
        transform: rotate(0deg);
    }
    50% {
        filter: drop-shadow(0 0 20px var(--gold-glow));
        transform: rotate(0deg);
    }
}

.logo-text h1 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.logo-separator {
    display: inline-block;
    width: 24px;
    height: 1px;
    background: var(--gold-primary);
    margin: 0 var(--space-xs);
    transform: rotate(-60deg);
}

.tagline {
    font-family: var(--font-elegant);
    font-size: 1.1rem;
    color: var(--text-gold);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 400;
}

/* Header Line Decoration */
.header-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    margin-top: var(--space-xl);
}

.line-segment {
    width: 100px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-gold));
}

.line-segment:last-child {
    background: linear-gradient(90deg, var(--border-gold), transparent);
}

.line-diamond {
    width: 8px;
    height: 8px;
    background: var(--gold-primary);
    transform: rotate(45deg);
}

/* ========================================
   CALCULATOR WRAPPER
   ======================================== */

.calculator-wrapper {
    background: linear-gradient(180deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow:
        0 0 0 1px var(--border-subtle),
        0 4px 6px rgba(0, 0, 0, 0.3),
        0 20px 60px -20px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(201, 162, 39, 0.05);
    animation: fadeSlideUp 0.8s var(--ease-out-expo);
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   TABS
   ======================================== */

.tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.tabs::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-subtle), transparent);
}

.tab {
    flex: 1;
    padding: var(--space-lg) var(--space-md);
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 400;
    cursor: pointer;
    transition: var(--transition-base);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-xs);
    overflow: hidden;
}

.tab-deco {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background: var(--gold-primary);
    transition: var(--transition-base);
}

.tab-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: relative;
    z-index: 1;
}

.tab-label {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.tab-sub {
    font-size: 0.75rem;
    opacity: 0.6;
    transition: var(--transition-fast);
}

.tab:hover {
    color: var(--text-primary);
    background: rgba(201, 162, 39, 0.03);
}

.tab:hover .tab-deco {
    transform: translateX(-50%) scaleX(0.5);
    opacity: 0.4;
}

.tab.active {
    color: var(--text-gold);
    background: linear-gradient(180deg, rgba(201, 162, 39, 0.08) 0%, transparent 100%);
}

.tab.active .tab-deco {
    transform: translateX(-50%) scaleX(1);
    opacity: 1;
}

.tab.active .tab-label {
    color: var(--gold-light);
}

/* ========================================
   CALCULATOR CONTENT
   ======================================== */

.calculator-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    padding: var(--space-2xl);
}

@media (max-width: 900px) {
    .calculator-content {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
        padding: var(--space-xl);
    }
}

/* ========================================
   INPUT SECTION
   ======================================== */

.calc-inputs {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.section-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.section-deco-left,
.section-deco-right {
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.section-deco-left {
    background: linear-gradient(90deg, transparent, var(--border-gold));
}

.section-deco-right {
    background: linear-gradient(90deg, var(--border-gold), transparent);
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: calc(-1 * var(--space-sm));
    font-weight: 300;
}

.input-grid {
    display: grid;
    gap: var(--space-lg);
}

/* Input Groups */
.input-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    animation: inputReveal 0.4s var(--ease-out-expo) backwards;
}

.input-group:nth-child(1) { animation-delay: 0.1s; }
.input-group:nth-child(2) { animation-delay: 0.15s; }
.input-group:nth-child(3) { animation-delay: 0.2s; }
.input-group:nth-child(4) { animation-delay: 0.25s; }
.input-group:nth-child(5) { animation-delay: 0.3s; }
.input-group:nth-child(6) { animation-delay: 0.35s; }

@keyframes inputReveal {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.input-group.hidden {
    display: none;
}

.input-group label {
    font-family: var(--font-elegant);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: 0.02em;
}

.input-wrapper {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: var(--transition-base);
    position: relative;
}

.input-glow {
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(90deg, transparent, var(--gold-subtle), transparent);
    transition: var(--transition-base);
    pointer-events: none;
}

.input-wrapper:focus-within {
    border-color: var(--gold-primary);
    box-shadow:
        0 0 0 3px var(--gold-glow),
        inset 0 0 20px var(--gold-subtle);
}

.input-wrapper:focus-within .input-glow {
    opacity: 1;
}

.input-prefix,
.input-suffix {
    padding: var(--space-md);
    color: var(--text-gold);
    font-family: var(--font-elegant);
    font-size: 1rem;
    background: rgba(201, 162, 39, 0.05);
    min-width: 50px;
    text-align: center;
    border-right: 1px solid var(--border-color);
}

.input-suffix {
    border-right: none;
    border-left: 1px solid var(--border-color);
}

.input-wrapper input {
    flex: 1;
    padding: var(--space-md);
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 400;
    outline: none;
    position: relative;
    z-index: 1;
}

.input-wrapper input::-webkit-outer-spin-button,
.input-wrapper input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.input-wrapper input[type="number"] {
    -moz-appearance: textfield;
}

.input-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 300;
}

/* Select Wrapper */
.select-wrapper {
    position: relative;
}

.select-wrapper select {
    width: 100%;
    padding: var(--space-md);
    padding-right: var(--space-2xl);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 400;
    cursor: pointer;
    outline: none;
    appearance: none;
    transition: var(--transition-base);
}

.select-wrapper select:focus {
    border-color: var(--gold-primary);
    box-shadow:
        0 0 0 3px var(--gold-glow),
        inset 0 0 20px var(--gold-subtle);
}

.select-arrow {
    position: absolute;
    right: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    width: 10px;
    height: 10px;
    border-right: 1px solid var(--text-gold);
    border-bottom: 1px solid var(--text-gold);
    transform: translateY(-60%) rotate(45deg);
    transition: var(--transition-fast);
}

.select-wrapper select:focus + .select-arrow {
    border-color: var(--gold-light);
}

/* ========================================
   CALCULATE BUTTON
   ======================================== */

.calculate-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    padding: var(--space-lg) var(--space-2xl);
    background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold-primary) 50%, var(--gold-light) 100%);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--bg-primary);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
    box-shadow:
        0 4px 20px var(--gold-glow),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-text {
    position: relative;
    z-index: 1;
}

.btn-arrow {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
}

.btn-arrow svg {
    width: 18px;
    height: 18px;
    transition: var(--transition-fast);
}

.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: var(--transition-slow);
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 30px var(--gold-glow),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.calculate-btn:hover .btn-shine {
    left: 100%;
}

.calculate-btn:hover .btn-arrow svg {
    transform: translateX(4px);
}

.calculate-btn:active {
    transform: translateY(0);
}

/* ========================================
   RESULTS SECTION
   ======================================== */

.calc-results {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

/* Result Cards */
.result-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    transition: var(--transition-base);
}

.result-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-gold);
}

.result-card.primary {
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.1) 0%, rgba(45, 90, 69, 0.08) 100%);
    border-color: var(--gold-primary);
    text-align: center;
    padding: var(--space-2xl);
    position: relative;
}

/* Frame Corners */
.result-frame {
    position: absolute;
    inset: 8px;
    pointer-events: none;
}

.frame-corner {
    position: absolute;
    width: 20px;
    height: 20px;
}

.frame-corner::before,
.frame-corner::after {
    content: '';
    position: absolute;
    background: var(--gold-primary);
}

.frame-corner.tl { top: 0; left: 0; }
.frame-corner.tl::before { top: 0; left: 0; width: 20px; height: 1px; }
.frame-corner.tl::after { top: 0; left: 0; width: 1px; height: 20px; }

.frame-corner.tr { top: 0; right: 0; }
.frame-corner.tr::before { top: 0; right: 0; width: 20px; height: 1px; }
.frame-corner.tr::after { top: 0; right: 0; width: 1px; height: 20px; }

.frame-corner.bl { bottom: 0; left: 0; }
.frame-corner.bl::before { bottom: 0; left: 0; width: 20px; height: 1px; }
.frame-corner.bl::after { bottom: 0; left: 0; width: 1px; height: 20px; }

.frame-corner.br { bottom: 0; right: 0; }
.frame-corner.br::before { bottom: 0; right: 0; width: 20px; height: 1px; }
.frame-corner.br::after { bottom: 0; right: 0; width: 1px; height: 20px; }

.result-label {
    font-family: var(--font-elegant);
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.result-value {
    font-family: var(--font-display);
    font-size: 2.8rem;
    font-weight: 600;
    color: var(--gold-light);
    text-shadow: 0 0 40px var(--gold-glow);
    transition: var(--transition-base);
}

.result-value.small {
    font-size: 1.4rem;
    color: var(--text-primary);
    text-shadow: none;
}

.result-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 300;
}

.result-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

@media (max-width: 600px) {
    .result-cards-grid {
        grid-template-columns: 1fr;
    }
}

/* Chart Container */
.chart-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    height: 250px;
    position: relative;
}

.chart-frame {
    position: absolute;
    inset: 0;
    border-radius: var(--radius-md);
    pointer-events: none;
    background: linear-gradient(135deg, var(--gold-subtle), transparent 30%, transparent 70%, var(--gold-subtle));
    opacity: 0.3;
}

/* ========================================
   INFO SECTION
   ======================================== */

.info-section {
    margin-top: var(--space-3xl);
    animation: fadeSlideUp 0.8s var(--ease-out-expo) 0.2s backwards;
}

.section-header.centered {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
}

.section-header.centered h2 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
}

.deco-line {
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-gold), transparent);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

@media (max-width: 768px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
}

.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    text-align: center;
    transition: var(--transition-base);
    position: relative;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: var(--gold-primary);
    opacity: 0;
    transition: var(--transition-base);
}

.info-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-gold);
    transform: translateY(-4px);
}

.info-card:hover::before {
    opacity: 1;
}

.info-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto var(--space-lg);
    color: var(--gold-primary);
    transition: var(--transition-base);
}

.info-card:hover .info-icon {
    color: var(--gold-light);
    filter: drop-shadow(0 0 10px var(--gold-glow));
}

.info-card h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.info-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.8;
    font-weight: 300;
}

/* ========================================
   FORMULA SECTION
   ======================================== */

.formula-section {
    margin-top: var(--space-3xl);
    animation: fadeSlideUp 0.8s var(--ease-out-expo) 0.3s backwards;
}

.formula-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

@media (max-width: 768px) {
    .formula-cards {
        grid-template-columns: 1fr;
    }
}

.formula-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    text-align: center;
    transition: var(--transition-base);
}

.formula-card:hover {
    border-color: var(--border-gold);
}

.formula-card h4 {
    font-family: var(--font-elegant);
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    font-weight: 500;
    letter-spacing: 0.05em;
}

.formula-card code {
    display: block;
    font-family: var(--font-elegant);
    font-size: 1rem;
    color: var(--gold-light);
    background: rgba(201, 162, 39, 0.08);
    padding: var(--space-md);
    border-radius: var(--radius-sm);
    border: 1px solid var(--gold-subtle);
}

.formula-card code sup {
    font-size: 0.7em;
    position: relative;
    top: -0.3em;
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
    margin-top: var(--space-3xl);
    padding: var(--space-2xl) 0;
    text-align: center;
    position: relative;
}

.footer-deco {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-gold), transparent);
}

.footer p {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 300;
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes resultPulse {
    0%, 100% {
        text-shadow: 0 0 40px var(--gold-glow);
    }
    50% {
        text-shadow: 0 0 60px var(--gold-glow), 0 0 80px var(--gold-subtle);
    }
}

.result-card.primary .result-value {
    animation: resultPulse 3s ease-in-out infinite;
}

/* Value Change Animation */
.result-value.updating {
    animation: valueUpdate 0.3s var(--ease-out-back);
}

@keyframes valueUpdate {
    0% {
        transform: scale(0.95);
        opacity: 0.5;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 480px) {
    .container {
        padding: var(--space-md);
    }

    .logo {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .logo-text h1 {
        font-size: 1.8rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .logo-separator {
        display: none;
    }

    .tabs {
        flex-direction: column;
    }

    .tab {
        padding: var(--space-md);
        border-bottom: 1px solid var(--border-color);
    }

    .tab:last-child {
        border-bottom: none;
    }

    .tab-deco {
        left: 0;
        transform: scaleX(0);
        width: 3px;
        height: 80%;
        top: 10%;
    }

    .tab.active .tab-deco,
    .tab:hover .tab-deco {
        transform: scaleX(1);
    }

    .result-value {
        font-size: 2rem;
    }

    .calculator-content {
        padding: var(--space-lg);
    }

    .section-header {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .section-deco-left,
    .section-deco-right {
        width: 60px;
        flex: none;
    }

    .corner-ornament {
        display: none;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    .bg-pattern,
    .bg-gradient,
    .corner-ornament,
    .calculate-btn {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .calculator-wrapper {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
