/* 🎨 Component Styles - Professional & Colorful */

/* ==================== HEADER ==================== */
.header {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    padding: var(--space-4) var(--space-6);
    margin-bottom: var(--space-8);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 10px;
    right: 10px;
    z-index: 20000;
    margin-top: 10px;
    animation: slideDown 0.5s ease-out;
}

/* Decorative gradient border */
.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    animation: shimmer 3s linear infinite;
}

.header-content {
    position: relative;
    z-index: 1;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: var(--space-4);
    margin-bottom: var(--space-1);
}

.header-logo-img {
    height: 42px;
    width: 42px;
    object-fit: contain;
    border-radius: var(--radius-md);
    background: #ffffff;
    padding: 3px;
    box-shadow: var(--shadow-sm);
    border: 1.5px solid var(--primary-100);
    flex-shrink: 0;
}

.logo-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: clamp(1.2rem, 3.5vw, 1.6rem);
    margin: 0;
    font-weight: var(--font-bold);
    letter-spacing: -0.3px;
}

.tagline {
    color: var(--text-secondary);
    font-size: var(--font-sm);
    font-weight: var(--font-medium);
    margin: 0;
    opacity: 0.9;
    padding-left: 58px;
    /* Clean alignment with 42px logo + 16px gap */
}

@media (max-width: 768px) {
    .tagline {
        padding-left: 54px;
        /* Adjust for mobile gap */
    }
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    z-index: 10;
}

.settings-trigger {
    background: var(--bg-glass-dark);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: 1.25rem;
}

.settings-trigger:hover {
    background: var(--gradient-primary);
    color: white;
    transform: rotate(30deg) scale(1.1);
    box-shadow: var(--shadow-md);
}

/* ==================== CALCULATOR CARD ==================== */
.calculator-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-xl);
    margin-bottom: var(--space-6);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.5s ease-out both;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Subtle gradient overlay */
.calculator-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 100% 0%, rgba(102, 126, 234, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

/* ==================== SECTIONS ==================== */
.calc-section {
    margin-bottom: var(--space-6);
    animation: fadeIn 0.4s ease-out;
    position: relative;
    z-index: 1;
}

.selectors-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
    align-items: flex-end;
}

.special-top-row {
    display: flex;
    gap: var(--space-4);
    align-items: flex-end;
}

@media (max-width: 580px) {
    .special-top-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }
}

.input-with-unit {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    position: relative;
}

.input-unit-suffix {
    padding: var(--space-3) var(--space-4);
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--radius-md);
    font-weight: var(--font-bold);
    min-width: 80px;
    text-align: center;
    box-shadow: var(--shadow-md);
    animation: slideInRight 0.3s ease-out;
}

@media (max-width: 580px) {
    .selectors-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

.section-label {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    font-size: var(--font-lg);
    margin-bottom: var(--space-3);
    position: relative;
    padding-left: var(--space-1);
}

/* Colorful accent bar */
.section-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 70%;
    background: var(--gradient-accent);
    border-radius: var(--radius-full);
}

.label-icon {
    font-size: var(--font-2xl);
    animation: pulse 2s ease-in-out infinite;
}

/* ==================== FORM INPUTS ==================== */
.select-input,
.text-input {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-size: var(--font-base);
    font-family: var(--font-primary);
    font-weight: var(--font-medium);
    border: 1px solid var(--text-light);
    border-radius: var(--radius-md);
    background: var(--bg-white);
    color: var(--text-primary);
    transition: all var(--transition-base);
    outline: none;
    box-shadow: var(--shadow-xs);
}

.select-input {
    cursor: pointer;
    appearance: none;
    background-image:
        linear-gradient(var(--bg-white), var(--bg-white)),
        url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23667eea' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat, no-repeat;
    background-position: 0 0, right var(--space-4) center;
    background-size: auto, 12px 8px;
    padding-right: var(--space-12);
}

.select-input:focus,
.text-input:focus {
    background: var(--bg-white);
    box-shadow: var(--shadow-purple), 0 0 0 4px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
    border-color: transparent;
}

.select-input:hover,
.text-input:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

/* Input Grid for Multiple Fields */
.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-5);
    margin-bottom: var(--space-6);
    animation: fadeIn 0.4s ease-out;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.input-label {
    font-weight: var(--font-semibold);
    color: var(--text-secondary);
    font-size: var(--font-sm);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-label span {
    font-size: var(--font-base);
}

/* ==================== BUTTONS ==================== */
.btn-calculate {
    width: 100%;
    padding: var(--space-5) var(--space-8);
    font-size: var(--font-lg);
    font-weight: var(--font-bold);
    font-family: var(--font-primary);
    color: var(--text-white);
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-bounce);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    margin-top: var(--space-6);
    position: relative;
    overflow: hidden;
}

/* Button shine effect */
.btn-calculate::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-calculate:hover::before {
    left: 100%;
}

.btn-calculate:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-2xl);
}

.btn-group-select {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
    font-size: var(--font-base);
    font-weight: var(--font-medium);
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.btn-group-select:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-group-select.active {
    background: var(--gradient-primary);
    color: white;
    border: none;
    box-shadow: var(--shadow-md);
}

.btn-calculate:active {
    transform: translateY(-2px) scale(0.98);
}

.btn-icon {
    font-size: var(--font-2xl);
    animation: bounce 1s ease-in-out infinite;
}

/* ==================== RESULT AREA ==================== */
.result-area {
    min-height: 80px;
    padding: var(--space-6);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    border-radius: var(--radius-lg);
    border: 2px dashed rgba(102, 126, 234, 0.3);
    font-size: var(--font-base);
    color: var(--text-primary);
    line-height: var(--leading-relaxed);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.result-area:empty::before {
    content: 'परिणाम यहां दिखाई देंगे... ✨';
    color: var(--text-muted);
    font-style: italic;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: var(--font-sm);
}

.result-area:not(:empty) {
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.12) 0%, rgba(0, 242, 254, 0.12) 100%);
    border-color: var(--success-500);
    border-style: solid;
    animation: resultSlideIn 0.5s ease-out;
    box-shadow: var(--shadow-blue);
}

.result-item {
    padding: var(--space-3) var(--space-4);
    margin: var(--space-2) 0;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-500);
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    box-shadow: var(--shadow-sm);
    animation: slideInLeft 0.3s ease-out;
}

.result-item:hover {
    transform: translateX(8px) scale(1.02);
    box-shadow: var(--shadow-md);
    border-left-color: var(--accent-500);
}

.result-item:nth-child(odd) {
    border-left-color: var(--primary-500);
}

.result-item:nth-child(even) {
    border-left-color: var(--accent-500);
}

.result-highlight {
    font-weight: var(--font-bold);
    font-size: var(--font-xl);
    color: var(--primary-500);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==================== INFO CARD ==================== */
.info-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-xl);
    animation: fadeInUp 0.6s ease-out 0.4s both;
    border: 1px solid rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
}

/* Colorful gradient accent */
.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-accent);
}

.info-card h3 {
    color: var(--text-primary);
    margin-bottom: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--font-xl);
    position: relative;
    padding-top: var(--space-2);
}

.info-card ul {
    list-style: none;
    padding: 0;
    display: grid;
    gap: var(--space-3);
}

.info-card li {
    padding: var(--space-3) var(--space-4);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    transition: all var(--transition-base);
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    font-weight: var(--font-medium);
}

.info-card li:hover {
    background: var(--gradient-primary);
    color: var(--text-white);
    transform: translateX(8px) scale(1.03);
    box-shadow: var(--shadow-purple);
}

/* ==================== FOOTER ==================== */
.footer {
    text-align: center;
    padding: var(--space-8);
    color: var(--text-white);
    font-size: var(--font-sm);
    animation: fadeIn 0.6s ease-out 0.6s both;
    position: relative;
    z-index: 1;
}

.footer p {
    margin: 0;
    opacity: 0.95;
    font-weight: var(--font-bold);
    color: var(--text-primary);
}

.footer-links {
    margin-top: var(--space-3);
    display: flex;
    justify-content: center;
    gap: var(--space-4);
    font-size: var(--font-xs);
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: var(--font-medium);
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-500);
}

.separator {
    color: var(--primary-100);
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 768px) {
    .header {
        padding: var(--space-6) var(--space-4);
    }

    .logo {
        justify-content: flex-start;
        gap: var(--space-3);
    }

    .logo-icon {
        font-size: var(--font-4xl);
    }

    .calculator-card,
    .info-card {
        padding: var(--space-6);
    }

    .input-grid {
        grid-template-columns: 1fr;
    }

    .btn-calculate {
        padding: var(--space-4) var(--space-6);
    }
}

@media (max-width: 480px) {

    .header,
    .calculator-card,
    .info-card {
        padding: var(--space-4);
        border-radius: var(--radius-xl);
    }

    .logo-text {
        font-size: var(--font-2xl);
    }

    .section-label {
        font-size: var(--font-base);
    }

    .select-input,
    .text-input {
        padding: var(--space-3) var(--space-4);
        font-size: var(--font-sm);
    }

    .btn-calculate {
        padding: var(--space-3) var(--space-4);
        font-size: var(--font-base);
    }

    .result-area {
        padding: var(--space-4);
    }

    .result-item {
        padding: var(--space-2) var(--space-3);
        font-size: var(--font-sm);
    }
}

/* ==================== CALCULATOR SELECTOR (CARD GRID) ==================== */
.calculator-selector {
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.selector-title {
    text-align: center;
    font-size: clamp(var(--font-2xl), 4vw, var(--font-3xl));
    margin-bottom: var(--space-8);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    color: var(--text-primary);
    font-weight: var(--font-extrabold);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.title-icon {
    font-size: var(--font-4xl);
    animation: bounce 2s ease-in-out infinite;
}

.calculator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-6);
    margin-bottom: var(--space-8);
}

/* Calculator Type Cards */
.calc-type-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-lg);
    border: 2px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all var(--transition-bounce);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.calc-type-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.calc-type-card:hover::before {
    opacity: 1;
}

.calc-type-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-300);
}

.calc-type-card:active {
    transform: translateY(-2px) scale(0.98);
}

.card-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-2xl);
    margin-bottom: var(--space-3);
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 1;
}

/* Gradient variations for card icons */
.gradient-blue {
    background: var(--gradient-blue);
}

.gradient-purple {
    background: var(--gradient-primary);
}

.gradient-pink {
    background: var(--gradient-secondary);
}

.gradient-orange {
    background: var(--gradient-orange);
}

.gradient-green {
    background: var(--gradient-green);
}

.gradient-cyan {
    background: var(--gradient-cyan);
}

.gradient-yellow {
    background: var(--gradient-yellow);
}

.card-title {
    font-size: var(--font-xl);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    margin: 0 0 var(--space-2) 0;
}

.card-description {
    font-size: var(--font-sm);
    color: var(--text-secondary);
    margin: 0 0 var(--space-4) 0;
    font-weight: var(--font-medium);
}

.card-features {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    justify-content: center;
}

.card-features span {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--font-xs);
    color: var(--text-secondary);
    font-weight: var(--font-medium);
    border: 1px solid rgba(102, 126, 234, 0.2);
}

/* ==================== BACK BUTTON ==================== */
.back-btn {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border: 2px solid rgba(102, 126, 234, 0.3);
    color: var(--primary-500);
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-lg);
    font-size: var(--font-base);
    font-weight: var(--font-semibold);
    font-family: var(--font-primary);
    cursor: pointer;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-6);
    box-shadow: var(--shadow-sm);
}

.back-btn:hover {
    background: var(--gradient-primary);
    color: var(--text-white);
    border-color: transparent;
    transform: translateX(-4px);
    box-shadow: var(--shadow-md);
}

.back-btn:active {
    transform: translateX(-2px) scale(0.98);
}

/* ==================== CALCULATOR HEADER ==================== */
.calc-header {
    text-align: center;
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: 2px solid rgba(102, 126, 234, 0.2);
}

.calc-title {
    font-size: clamp(1.2rem, 4vw, 2rem);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    font-weight: var(--font-extrabold);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* ==================== BASIC CALCULATOR ==================== */
.calc-display-wrapper {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: var(--radius-lg);
    padding: var(--space-2);
    margin-bottom: var(--space-5);
    box-shadow: var(--shadow-inner);
}

.calc-display-new {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-5);
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    border: 2px solid rgba(102, 126, 234, 0.1);
    font-family: 'Inter', sans-serif;
}

.calc-expression {
    font-size: 1.1rem;
    color: var(--text-muted);
    text-align: right;
    word-break: break-all;
    min-height: 1.5rem;
    transition: all 0.2s ease;
}

.calc-result {
    font-size: 1.8rem;
    font-weight: var(--font-bold);
    color: var(--text-primary);
    text-align: right;
    word-break: break-all;
    min-height: 2rem;
    transition: all 0.2s ease;
}

/* Hide result area when basic calculator is active */
#basicCalculatorContainer:not(.hidden)~#resultArea {
    display: none !important;
}

.calc-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-3);
}

.calc-btn {
    background: var(--bg-white);
    border: 1px solid var(--text-light);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    font-size: var(--font-lg);
    font-weight: var(--font-semibold);
    font-family: var(--font-primary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-xs);
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calc-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-500);
}

.calc-btn:active {
    transform: scale(0.95);
    box-shadow: var(--shadow-xs);
}

/* Number buttons */
.btn-number {
    background: var(--bg-white);
}

.btn-number:hover {
    background: var(--bg-secondary);
}

/* Operator buttons */
.btn-operator {
    background: var(--gradient-primary);
    color: var(--text-white);
    border-color: transparent;
}

.btn-operator:hover {
    background: var(--gradient-secondary);
    box-shadow: var(--shadow-purple);
}

/* Clear button */
.btn-clear {
    background: var(--gradient-orange);
    color: var(--text-white);
    border-color: transparent;
}

.btn-clear:hover {
    background: linear-gradient(135deg, #ff6a88 0%, #ff9a56 100%);
    box-shadow: var(--shadow-pink);
}

/* Equals button */
.btn-equals {
    background: var(--gradient-success);
    color: var(--text-white);
    border-color: transparent;
    font-size: var(--font-3xl);
}

.btn-equals:hover {
    background: linear-gradient(135deg, #00d8e4 0%, #4facfe 100%);
    box-shadow: var(--shadow-blue);
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 768px) {
    .header {
        padding: var(--space-6) var(--space-4);
    }

    .logo {
        flex-direction: column;
        gap: var(--space-2);
    }

    .logo-icon {
        font-size: var(--font-4xl);
    }

    .calculator-card,
    .info-card {
        padding: var(--space-6);
    }

    .input-grid {
        grid-template-columns: 1fr;
    }

    .btn-calculate {
        padding: var(--space-4) var(--space-6);
    }

    .calculator-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: var(--space-4);
    }

    .card-icon {
        width: 60px;
        height: 60px;
        font-size: var(--font-3xl);
    }

    .calc-buttons {
        gap: var(--space-2);
    }

    .calc-btn {
        padding: var(--space-4);
        font-size: var(--font-lg);
        min-height: 50px;
    }
}

@media (max-width: 480px) {

    .header,
    .calculator-card,
    .info-card {
        padding: var(--space-4);
        border-radius: var(--radius-xl);
    }

    .logo-text {
        font-size: var(--font-2xl);
    }

    .section-label {
        font-size: var(--font-base);
    }

    .select-input,
    .text-input {
        padding: var(--space-3) var(--space-4);
        font-size: var(--font-sm);
    }

    .btn-calculate {
        padding: var(--space-3) var(--space-4);
        font-size: var(--font-base);
    }

    .result-area {
        padding: var(--space-4);
    }

    .result-item {
        padding: var(--space-2) var(--space-3);
        font-size: var(--font-sm);
    }

    .calculator-grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }

    .selector-title {
        font-size: var(--font-xl);
        margin-bottom: var(--space-6);
    }

    .title-icon {
        font-size: var(--font-3xl);
    }

    .calc-buttons {
        gap: var(--space-2);
    }

    .calc-btn {
        padding: var(--space-3);
        font-size: var(--font-base);
        min-height: 45px;
    }

    .calc-display {
        padding: var(--space-4);
        font-size: var(--font-2xl);
        min-height: 60px;
    }
}

/* ==================== SETTINGS MODAL ==================== */
/* Removed redundant trigger class */
.settings-icon {
    font-size: var(--font-2xl);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-overlay);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    transition: all var(--transition-base);
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.modal-content {
    background: var(--bg-card);
    width: 95%;
    max-width: 480px;
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-2xl);
    border: 1px solid rgba(0, 0, 0, 0.1);
    transform: scale(1);
    transition: all var(--transition-base);
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
}

.modal-overlay.hidden .modal-content {
    transform: scale(0.8);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: 2px solid rgba(102, 126, 234, 0.1);
}

.modal-header h2 {
    margin: 0;
    font-size: var(--font-2xl);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.close-modal {
    background: none;
    border: none;
    font-size: var(--font-4xl);
    color: var(--text-light);
    cursor: pointer;
    transition: color var(--transition-base);
}

.setting-group {
    margin-bottom: var(--space-6);
}

.setting-label {
    display: block;
    font-weight: var(--font-bold);
    color: var(--text-primary);
    margin-bottom: var(--space-3);
    font-size: var(--font-base);
}

.radio-group {
    display: flex;
    gap: var(--space-4);
}

.radio-group input[type="radio"] {
    display: none;
}

.radio-group label {
    padding: var(--space-2) var(--space-6);
    background: var(--bg-white);
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    font-weight: var(--font-semibold);
}

.radio-group input[type="radio"]:checked+label {
    background: var(--gradient-primary);
    color: var(--text-white);
    border-color: transparent;
}

.theme-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-3);
}

.theme-option {
    height: 50px;
    border-radius: var(--radius-md);
    border: 3px solid transparent;
    cursor: pointer;
    transition: all var(--transition-base);
}

.theme-option.active {
    border-color: var(--primary-500);
    transform: scale(1.1);
}

.color-picker {
    width: 100%;
    height: 45px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    background: none;
}

.btn-secondary {
    width: 100%;
    padding: var(--space-4);
    background: var(--bg-secondary);
    border: 2px solid rgba(102, 126, 234, 0.1);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    font-weight: var(--font-bold);
    cursor: pointer;
}

/* ==================== PRINT STYLES ==================== */
@media print {
    body {
        background: white;
    }

    .footer,
    .info-card,
    .settings-trigger {
        display: none;
    }
}

/* ==================== SLIDER / CAROUSEL ==================== */
.slider-view {
    padding: var(--space-4) 0;
    max-width: 100% !important;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 120px);
    justify-content: center;
}

.slider-container {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    height: 65vh;
    display: flex;
    align-items: center;
}

.slider-container::-webkit-scrollbar {
    display: none;
}

.slider-track {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: var(--space-6) !important;
    padding: 0 10vw !important;
    width: max-content;
    height: 100%;
}

.calc-type-card {
    scroll-snap-align: center;
    width: 80vw;
    max-width: 360px;
    flex-shrink: 0;
    margin: 0;
    height: 90%;
    display: flex !important;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
    opacity: 0.5;
    transform: scale(0.9);
}

.calc-type-card.active-slide {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: var(--space-8);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    opacity: 0.3;
    transition: all 0.3s ease;
}

.dot.active {
    background: var(--primary-500);
    opacity: 1;
    width: 25px;
    border-radius: 5px;
}

.slider-hint {
    text-align: center;
    margin-top: var(--space-4);
    color: var(--text-muted);
    font-size: var(--font-xs);
    font-weight: var(--font-bold);
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: bounceX 2s infinite;
}

@keyframes bounceX {

    0%,
    100% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(10px);
    }
}

/* ==================== HEADER NAVIGATION ==================== */
.nav-dropdown-wrapper {
    display: flex;
    align-items: center;
    margin-right: var(--space-4);
}

.nav-select {
    padding: 8px 30px 8px 15px;
    border-radius: var(--radius-full);
    border: 2px solid var(--primary-100);
    background: var(--bg-white);
    font-size: 0.8em;
    font-weight: var(--font-bold);
    color: var(--text-primary);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23333333' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.nav-select:hover {
    border-color: var(--primary-500);
    box-shadow: var(--shadow-md);
}

@media (max-width: 768px) {
    .header-content {
        display: none !important;
        /* Hide logo text on small screens if nav is present */
    }

    .header {
        justify-content: space-between;
    }

    .logo {
        margin-bottom: 0;
    }
}

/* ==================== PREMIUM PRO STYLES ==================== */
.pro-trigger {
    background: linear-gradient(135deg, #b8860b 0%, #ffd700 100%);
    color: black;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-weight: bold;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(184, 134, 11, 0.3);
    transition: all 0.3s ease;
    margin-left: 10px;
}

.pro-trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(184, 134, 11, 0.5);
}

.pro-card-premium {
    border: 2px solid #ffd700 !important;
    background: #ffffff !important;
}

.pro-features-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.pro-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.pro-item-icon {
    font-size: 1.8rem;
    background: rgba(184, 134, 11, 0.1);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.pro-badge-coming {
    background: #fff8e1;
    color: #b8860b;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    font-size: 0.9rem;
    margin-top: 10px;
    border: 1px dashed #ffd700;
}

@media (max-width: 600px) {
    .pro-trigger span:not(.pro-icon) {
        display: none;
    }

    .pro-trigger {
        padding: 8px;
    }
}