:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --bg-gradient: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-gradient);
    color: var(--text-main);
    min-height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.page-wrapper {
    width: 100%;
    max-width: 640px;
}

.calc-card {
    background: var(--card-bg);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    padding: 32px;
    border: 1px solid rgba(255, 255, 255, 0.7);
}

.calc-header {
    text-align: center;
    margin-bottom: 32px;
}

.calc-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #0f172a;
}

.calc-subtitle {
    font-size: 14px;
    color: var(--text-muted);
}

/* Tabs */
.tabs-modern {
    display: flex;
    background: #f1f5f9;
    padding: 6px;
    border-radius: 14px;
    gap: 4px;
}

.tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-btn.active {
    background: #ffffff;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.tab-icon {
    width: 18px;
    height: 18px;
}

/* Form Elements */
.section-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.btn-group-premium {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

.btn-premium {
    width: 100%;
    padding: 10px 4px;
    border: 1px solid var(--border-color);
    background: #ffffff;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-main);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-align: center;
}

@media (max-width: 600px) {
    .btn-group-premium {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 400px) {
    .btn-group-premium {
        grid-template-columns: repeat(3, 1fr);
    }
}

.btn-premium:hover {
    border-color: var(--primary);
    background: #f8fafc;
    transform: translateY(-1px);
}

.btn-premium.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.input-wrapper, .dropdown-wrapper {
    position: relative;
}

.custom-input, .custom-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #f1f5f9;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    background: #f8fafc;
    transition: all 0.2s;
}

.custom-input:focus, .custom-select:focus {
    outline: none;
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

/* Results Grid */
.results-grid {
    margin-top: 32px;
}

.result-card {
    border-radius: 16px;
    padding: 20px;
    position: relative;
    transition: all 0.2s;
}

.main-result {
    background: #f5f3ff;
    border: 1px solid #ddd6fe;
    margin-bottom: 24px;
}

.secondary-result {
    background: #f8fafc;
    border: 1px solid var(--border-color);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.result-badge {
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.result-tag {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.result-content {
    font-size: 18px;
    font-weight: 600;
    color: #1e1b4b;
    line-height: 1.5;
}

.result-content-small {
    font-size: 15px;
    font-weight: 500;
    color: #334155;
}

/* Buttons */
.copy-pill {
    background: #ffffff;
    border: 1px solid #ddd6fe;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.copy-pill:hover {
    background: var(--primary);
    color: #ffffff;
}

.icon-copy {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s;
}

.icon-copy:hover {
    background: #e2e8f0;
    color: var(--primary);
}

/* Toast */
.premium-toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1e293b;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
}

.premium-toast.show {
    transform: translateX(-50%) translateY(0);
}

.hidden {
    display: none;
}

@media (max-width: 500px) {
    .btn-group-premium {
        grid-template-columns: repeat(3, 1fr);
    }
}
