:root {
    /* پالت رنگی نئون طلایی و تیره */
    --bg-dark: #0a0a0a;
    --bg-panel: #141414;
    
    --gold-primary: #FFD700;
    --gold-light: #FFF7CC;
    --gold-dark: #B8860B;
    
    --neon-glow: 0 0 10px rgba(255, 215, 0, 0.3), 0 0 20px rgba(255, 215, 0, 0.1);
    --neon-text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
    
    --text-main: #e0e0e0;
    --text-muted: #a0a0a0;
    
    --border-gold: rgba(255, 215, 0, 0.2);
    --radius: 16px;
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.5);
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* اسکرول بار زیبا */
    scrollbar-width: thin;
    scrollbar-color: var(--gold-dark) var(--bg-dark);
}

body { 
    background-color: var(--bg-dark); 
    color: var(--text-main); 
    padding: 20px; 
    line-height: 1.6;
    /* بافت پس‌زمینه بسیار محو */
    background-image: radial-gradient(circle at 50% 50%, #1a1a1a 0%, #000000 100%);
    min-height: 100vh;
}

.container { max-width: 1400px; margin: 0 auto; }

/* Header */
header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 30px; 
    flex-wrap: wrap; 
    gap: 15px; 
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-gold);
}

h1 { 
    color: var(--gold-primary); 
    font-size: 2rem; 
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: var(--neon-text-shadow);
}

.lang-btn { 
    background: linear-gradient(135deg, var(--gold-dark), var(--gold-primary)); 
    color: #000; 
    border: none; 
    padding: 10px 24px; 
    border-radius: 30px; 
    cursor: pointer; 
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: var(--neon-glow);
}

.lang-btn:hover { 
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
}

/* Tabs */
.tabs { 
    display: flex; 
    gap: 10px; 
    margin-bottom: 25px; 
    border-bottom: 1px solid var(--border-gold); 
    overflow-x: auto; 
    padding-bottom: 5px;
}

.tab-btn { 
    padding: 12px 24px; 
    background: transparent; 
    border: 1px solid var(--border-gold); 
    cursor: pointer; 
    font-size: 0.95rem; 
    color: var(--text-muted); 
    border-radius: 8px 8px 0 0;
    transition: all 0.3s; 
    white-space: nowrap; 
}

.tab-btn.active { 
    color: #000; 
    background: var(--gold-primary); 
    border-color: var(--gold-primary);
    font-weight: bold;
    box-shadow: 0 -5px 15px rgba(255, 215, 0, 0.2);
}

.tab-btn:hover:not(.active) { 
    color: var(--gold-primary); 
    border-color: var(--gold-primary);
    background: rgba(255, 215, 0, 0.05);
}

/* Content Sections */
.tab-content { display: none; animation: fadeIn 0.5s ease; }
.tab-content.active { display: block; }

@keyframes fadeIn { 
    from { opacity: 0; transform: translateY(10px); } 
    to { opacity: 1; transform: translateY(0); } 
}

/* Grid Layouts */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 25px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }

@media (max-width: 900px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* Cards */
.card { 
    background: var(--bg-panel); 
    border: 1px solid var(--border-gold); 
    border-radius: var(--radius); 
    padding: 25px; 
    box-shadow: var(--shadow-card); 
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
}

/* افکت خط طلایی بالای کارت */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
}

.card h3 { 
    color: var(--gold-primary); 
    margin-bottom: 20px; 
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); 
    padding-bottom: 10px; 
    font-size: 1.2rem;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
}

/* Tables */
.table-responsive { overflow-x: auto; border-radius: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { padding: 12px 15px; text-align: center; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
th { 
    background: rgba(255, 215, 0, 0.1); 
    color: var(--gold-primary); 
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.8rem;
}
tr:hover td { background: rgba(255, 215, 0, 0.03); }

input[type="number"] { 
    width: 80px; 
    padding: 8px; 
    border: 1px solid var(--border-gold); 
    border-radius: 6px; 
    text-align: center; 
    background: rgba(0,0,0,0.3);
    color: var(--gold-primary);
    font-weight: bold;
}
input[type="number"]:focus {
    outline: none;
    border-color: var(--gold-primary);
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}

/* Calculation Report Styles */
.calc-report { 
    background: rgba(20, 20, 20, 0.8); 
    border: 1px solid var(--border-gold); 
    border-radius: 12px; 
    overflow: hidden; 
    backdrop-filter: blur(5px);
}

.calc-row { 
    display: flex; 
    padding: 12px 15px; 
    border-bottom: 1px solid rgba(255, 255, 255, 0.05); 
    align-items: center; 
    transition: background 0.2s;
}
.calc-row:hover { background: rgba(255, 215, 0, 0.05); }

.calc-row.header { 
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.15), transparent); 
    font-weight: bold; 
    color: var(--gold-primary); 
}

.calc-cell { flex: 1; text-align: center; }
.calc-cell.wide { flex: 2; text-align: right; padding-right: 15px; }
.calc-cell.narrow { flex: 0.5; }

.formula-display { 
    background: rgba(0, 0, 0, 0.4); 
    padding: 20px; 
    border-radius: 10px; 
    margin: 20px 0; 
    text-align: center; 
    font-family: 'Courier New', monospace; 
    font-size: 1.2rem; 
    direction: ltr; 
    border: 1px dashed var(--gold-dark);
    color: var(--gold-light);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
}

.result-highlight { 
    color: var(--gold-primary); 
    font-weight: bold; 
    font-size: 1.4rem; 
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* Charts */
.chart-container { height: 350px; position: relative; display: flex; justify-content: center; align-items: center; }
.chart-container-small { height: 250px; }

/* Wind Rose SVG */
.wind-rose-svg { width: 100%; height: 100%; max-width: 400px; max-height: 400px; filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.2)); }
.rose-sector { transition: all 0.3s; cursor: pointer; fill: rgba(255, 215, 0, 0.6); stroke: var(--gold-dark); }
.rose-sector:hover { fill: var(--gold-primary); filter: drop-shadow(0 0 8px var(--gold-primary)); }
.rose-label { font-size: 11px; fill: var(--text-main); font-weight: bold; text-anchor: middle; dominant-baseline: middle; }

/* Bar Chart */
.bar-chart-wrap { 
    display: flex; 
    align-items: flex-end; 
    justify-content: space-around; 
    height: 100%; 
    padding-bottom: 35px; 
    border-bottom: 2px solid var(--border-gold); 
}

.bar-col { display: flex; flex-direction: column; align-items: center; width: 100%; height: 100%; justify-content: flex-end; }

.bar { 
    width: 50px; 
    background: linear-gradient(180deg, var(--gold-primary), var(--gold-dark)); 
    border-radius: 6px 6px 0 0; 
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    position: relative; 
    min-height: 4px;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

.bar:hover { 
    background: linear-gradient(180deg, #fff, var(--gold-primary)); 
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
    transform: scaleY(1.02);
    transform-origin: bottom;
}

.bar-val { 
    position: absolute; 
    top: -30px; 
    left: 50%; 
    transform: translateX(-50%); 
    font-size: 0.9rem; 
    font-weight: bold; 
    color: var(--gold-primary);
    text-shadow: 0 0 5px rgba(0,0,0,0.8);
}

.bar-lbl { margin-top: 12px; font-size: 0.85rem; color: var(--text-muted); }

/* Dominant Wind Cards */
.dom-card { 
    text-align: center; 
    border: 1px solid var(--border-gold); 
    padding: 15px; 
    border-radius: 12px; 
    background: linear-gradient(145deg, rgba(20,20,20,0.9), rgba(10,10,10,0.9)); 
    margin-top: 15px;
    transition: transform 0.3s;
}
.dom-card:hover { transform: translateY(-5px); border-color: var(--gold-primary); }
.calc-row{background-color: #000000;}
.calc-cell{
  
    color: #B8860B;
}
.dom-card h4 { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 1px; }
.dom-card .dir-val { font-size: 1.5rem; font-weight: bold; color: var(--gold-primary); text-shadow: var(--neon-text-shadow); }
.dom-card .freq-val { font-size: 0.9rem; color: var(--text-main); margin-top: 5px; }