* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f7f5ff;
    color: #2d3748;
    display: flex;
    justify-content: center;
    padding: 40px 20px;
    min-height: 100vh;
}

.main-container {
    width: 100%;
    max-width: 650px;
}

/* الهيدر واللوجو */
.header-section {
    text-align: center;
    margin-bottom: 25px;
}

.brand-logo {
    font-size: 3.2rem;
    font-weight: 900;
    font-family: 'Arial Black', Impact, sans-serif;
    letter-spacing: 2px;
    margin-bottom: 15px;
    
    /* التدرج الوردي/البنفسجي للحروف مع إصلاح التوافقية */
    background: linear-gradient(135deg, #a855f7, #ec4899);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    
    /* وهج الحروف glow */
    filter: drop-shadow(0px 4px 12px rgba(168, 85, 247, 0.35));
}

.subtitle {
    font-size: 1.6rem;
    color: #2d3436;
    margin-bottom: 5px;
}

.desc {
    color: #7f8c8d;
    font-size: 0.95rem;
}

/* الكارت الأساسي */
.calculator-card {
    background: #ffffff;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(108, 92, 231, 0.08);
    margin-bottom: 25px;
}

/* تقسيم الأسطر شبكي (كل 2 بجانب بعض) */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

@media (max-width: 500px) {
    .form-grid { grid-template-columns: 1fr; }
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #4a5568;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background-color: #f8fafc;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s;
}

.input-group input:focus,
.input-group select:focus {
    border-color: #a29bfe;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(162, 155, 254, 0.2);
}

/* الزر الوردي/البنفسجي */
button#calc-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

button#calc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.4);
}

.privacy-note {
    text-align: center;
    font-size: 0.8rem;
    color: #a0aec0;
    margin-top: 12px;
}

/* كروت النتائج */
.results-container {
    text-align: center;
}

.results-title {
    font-size: 1.3rem;
    color: #2d3748;
    margin-bottom: 15px;
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 500px) {
    .results-grid { grid-template-columns: 1fr; }
}

.result-card {
    background: #ffffff;
    padding: 25px 20px;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.card-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.pink-icon { background: #fce7f3; }
.purple-icon { background: #f3e8ff; }

.card-label {
    font-size: 0.9rem;
    color: #718096;
    font-weight: 600;
}

.card-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: #9333ea;
    margin: 5px 0;
}

.card-unit {
    font-size: 0.85rem;
    color: #a0aec0;
    margin-bottom: 15px;
}

.card-footer {
    font-size: 0.75rem;
    color: #718096;
    background: #f8fafc;
    padding: 10px;
    border-radius: 8px;
    width: 100%;
}

.hidden { display: none !important; }

.error-box {
    margin-top: 15px;
    padding: 12px;
    background-color: #ffe6e6;
    color: #d63031;
    border-radius: 8px;
    text-align: center;
}