/* ==========================================
   EuroStay Tax & Yield Calculator - Stylesheet
   Sofia 2027 - Premium Dark Glassmorphism Theme
   ========================================== */

/* Custom Reset & Variables */
:root {
    /* Fonts */
    --font-header: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    /* Theme Colors */
    --bg-main: #070d19;
    --bg-card: rgba(16, 26, 48, 0.45);
    --border-card: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(0, 242, 254, 0.4);
    
    /* Brand Gradients & Accents */
    --color-primary: #00f2fe; /* Cyan */
    --color-secondary: #4facfe; /* Blue */
    --color-accent: #8b5cf6; /* Violet */
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --text-glow: #ffffff;
    
    /* Category Colors */
    --color-profit: #10b981;    /* Emerald Green */
    --color-platform: #3b82f6;  /* Blue */
    --color-tax: #f59e0b;       /* Amber */
    --color-cleaning: #ec4899;  /* Pink */
    --color-patent: #a78bfa;    /* Violet-light */
    
    /* Animations */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem 1rem;
    overflow-x: hidden;
    position: relative;
}

/* Ambient Glow Background */
.glow-bg {
    position: fixed;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    z-index: -1;
    background: 
        radial-gradient(circle at 15% 15%, rgba(0, 242, 254, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 85% 20%, rgba(139, 92, 246, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 50% 85%, rgba(79, 172, 254, 0.08) 0%, transparent 50%);
    filter: blur(80px);
    pointer-events: none;
}

/* Main Container Layout */
.app-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Header Styling */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 1px solid var(--border-card);
    padding-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.badge {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #070d19;
    font-family: var(--font-header);
    font-weight: 700;
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    letter-spacing: 0.05em;
    display: inline-block;
    margin-bottom: 0.5rem;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.4);
}

h1 {
    font-family: var(--font-header);
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #ffffff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.header-info {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.last-update strong {
    color: var(--text-main);
}

/* Responsive Grid System */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 900px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
    
    .app-header {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Glassmorphism Cards */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    padding: 1.75rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transition: var(--transition-smooth);
}

.card:hover {
    border-color: rgba(0, 242, 254, 0.15);
    box-shadow: 0 12px 40px rgba(0, 242, 254, 0.05);
}

.glass {
    position: relative;
    overflow: hidden;
}

.glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.02) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(25deg);
    pointer-events: none;
}

.card-title {
    font-family: var(--font-header);
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.icon {
    font-size: 1.35rem;
}

/* Controls / Inputs */
.controls-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.input-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
}

.value-badge {
    background: rgba(0, 242, 254, 0.1);
    border: 1px solid var(--border-focus);
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-family: var(--font-header);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.1);
}

.input-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Star Selector Tabs */
.star-tabs {
    display: flex;
    background: rgba(10, 15, 30, 0.6);
    border: 1px solid var(--border-card);
    border-radius: 10px;
    padding: 0.25rem;
    width: 100%;
}

.star-tab {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-muted);
    font-family: var(--font-header);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.5rem 0;
    cursor: pointer;
    border-radius: 8px;
    transition: var(--transition-smooth);
}

.star-tab:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.03);
}

.star-tab.active {
    color: #070d19;
    background: linear-gradient(to right, var(--color-primary), var(--color-secondary));
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.3);
}

/* Range Sliders styling */
.slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(10, 15, 30, 0.8);
    outline: none;
    transition: var(--transition-smooth);
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid var(--color-primary);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.6);
    transition: var(--transition-smooth);
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: var(--color-primary);
}

.slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid var(--color-primary);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.6);
    transition: var(--transition-smooth);
}

.slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    background: var(--color-primary);
}

/* Toggle Switches */
.toggle-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 15, 30, 0.3);
    border: 1px solid var(--border-card);
    border-radius: 12px;
    padding: 1rem;
}

.toggle-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    max-width: 75%;
}

.toggle-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
}

.toggle-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(10, 15, 30, 0.8);
    border: 1px solid var(--border-card);
    border-radius: 24px;
    transition: var(--transition-smooth);
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-muted);
    border-radius: 50%;
    transition: var(--transition-smooth);
}

input:checked + .switch-slider {
    background-color: rgba(0, 242, 254, 0.15);
    border-color: var(--color-primary);
}

input:checked + .switch-slider:before {
    transform: translateX(24px);
    background-color: var(--color-primary);
    box-shadow: 0 0 8px var(--color-primary);
}

/* Results / Right Panel */
.results-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Scenario Panel */
.scenario-panel {
    border: 1px solid var(--border-card);
    border-radius: 16px;
    padding: 1.5rem;
    background-color: rgba(12, 22, 43, 0.5);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.panel-subtitle {
    font-family: var(--font-header);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-secondary);
    letter-spacing: 0.08em;
}

.scenario-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.scenario-btn {
    background: rgba(10, 15, 30, 0.5);
    border: 1px solid var(--border-card);
    border-radius: 12px;
    padding: 0.75rem 0.5rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    transition: var(--transition-smooth);
    outline: none;
}

.scenario-btn:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.02);
}

.scenario-btn.active {
    background: rgba(139, 92, 246, 0.15);
    border-color: var(--color-accent);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
}

.scen-title {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
}

.scenario-btn.active .scen-title {
    color: #ffffff;
}

.scen-val {
    font-family: var(--font-header);
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
}

.scenario-btn.active .scen-val {
    color: var(--color-accent);
    text-shadow: 0 0 8px rgba(139, 92, 246, 0.4);
}

.scenario-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
    min-height: 2.8rem;
}

/* Primary Result Box */
.result-display-box {
    border-radius: 16px;
    padding: 2.25rem 1.75rem;
    background: linear-gradient(135deg, rgba(16, 26, 48, 0.85) 0%, rgba(10, 15, 30, 0.95) 100%);
    border: 1px solid rgba(0, 242, 254, 0.25);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-align: center;
    position: relative;
}

.primary-glow::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    box-shadow: inset 0 0 20px rgba(0, 242, 254, 0.15);
    pointer-events: none;
}

.result-label {
    font-family: var(--font-header);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--color-primary);
    letter-spacing: 0.08em;
}

.result-value {
    font-family: var(--font-header);
    font-size: 3.25rem;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 0 25px rgba(0, 242, 254, 0.4);
    letter-spacing: -0.01em;
    animation: pulseGlow 3s infinite ease-in-out;
}

.result-details-text {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.result-details-text strong {
    color: #ffffff;
    font-size: 1.05rem;
}

.result-details-text span {
    text-decoration: line-through;
    color: var(--text-muted);
}

@keyframes pulseGlow {
    0%, 100% {
        text-shadow: 0 0 20px rgba(0, 242, 254, 0.35);
    }
    50% {
        text-shadow: 0 0 35px rgba(0, 242, 254, 0.65);
    }
}

/* Expenses visual chart progress bar */
.chart-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.progress-bar-legend {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
}

.progress-bar {
    display: flex;
    height: 12px;
    border-radius: 6px;
    background: rgba(10, 15, 30, 0.8);
    overflow: hidden;
    width: 100%;
}

.bar-segment {
    height: 100%;
    transition: width 0.5s ease-out;
}

.profit-bar { background-color: var(--color-profit); box-shadow: 0 0 10px rgba(16, 185, 129, 0.3); }
.fee-bar { background-color: var(--color-platform); }
.tax-bar { background-color: var(--color-tax); }
.cleaning-bar { background-color: var(--color-cleaning); }
.patent-bar { background-color: var(--color-patent); }

/* Breakdown list */
.breakdown-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 0.5rem;
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
}

.sub-row {
    font-size: 0.85rem;
    color: var(--text-muted);
    padding-left: 0.5rem;
}

.divider {
    border: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 0.25rem 0;
}

.row-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bullet {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.bullet.platform { background-color: var(--color-platform); }
.bullet.tax { background-color: var(--color-tax); }
.bullet.cleaning { background-color: var(--color-cleaning); }
.bullet.patent { background-color: var(--color-patent); }

.row-value {
    color: #ffffff;
    font-family: var(--font-header);
    font-weight: 500;
}

.font-bold {
    font-weight: 700;
    font-size: 1.1rem;
}

.highlight-row {
    color: #ffffff;
    font-weight: 600;
}

.profit-highlight {
    background: rgba(16, 185, 129, 0.05);
    border-left: 3px solid var(--color-profit);
    padding: 0.5rem;
    border-radius: 4px;
    margin-top: 0.5rem;
}

.profit-highlight .row-label {
    color: var(--color-profit);
}

.profit-highlight .row-value {
    color: var(--color-profit);
    font-size: 1.25rem;
}

/* Footer & Disclaimers */
.app-footer {
    border-top: 1px solid var(--border-card);
    padding-top: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    background: transparent;
    box-shadow: none;
}

.footer-languages {
    display: flex;
    background: rgba(10, 15, 30, 0.6);
    border: 1px solid var(--border-card);
    border-radius: 8px;
    padding: 0.2rem;
}

.lang-btn {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.35rem 0.85rem;
    cursor: pointer;
    border-radius: 5px;
    transition: var(--transition-smooth);
}

.lang-btn.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.disclaimer-content {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.5;
    text-align: center;
    max-width: 800px;
}

.copyright {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.2);
    text-align: center;
    margin-top: 0.5rem;
}

/* Mobile and Tablet Responsiveness Updates */
@media (max-width: 600px) {
    body {
        padding: 1rem 0.75rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .badge {
        font-size: 0.7rem;
    }
    
    .card {
        padding: 1.25rem;
        gap: 1.25rem;
    }
    
    .result-display-box {
        padding: 1.75rem 1.25rem;
    }
    
    .result-value {
        font-size: 2.25rem;
    }
    
    .scenario-buttons {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .scenario-btn {
        padding: 0.6rem 1rem;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        gap: 1rem;
    }
    
    .scen-val {
        font-size: 0.95rem;
    }
}

@media (max-width: 380px) {
    .star-tab {
        font-size: 0.85rem;
        padding: 0.4rem 0;
    }
    
    .app-header {
        padding-bottom: 1rem;
    }
    
    .result-value {
        font-size: 2.0rem;
    }
}

/* Suite Navigation Bar */
.suite-nav {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-card);
    padding-bottom: 0.75rem;
}

.suite-nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-family: var(--font-header);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.suite-nav-link:hover {
    color: #ffffff;
}

.suite-nav-link.active {
    color: var(--color-primary);
}


