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

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f0f9ff 0%, #e6f7ff 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: linear-gradient(135deg, #0f4b7e, #1a75bb);
    color: white;
    padding: 3rem 0;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><polygon points="0,0 100,100 0,100" fill="rgba(255,255,255,0.05)"/></svg>');
    background-size: cover;
}

header h1 {
    font-size: 2.8rem;
    margin-bottom: 0.8rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
}

header p {
    font-size: 1.3rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

main {
    padding: 2.5rem 0;
    position: relative;
    z-index: 1;
}

/* Tab Navigation */
.tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    max-width: fit-content;
    margin: -2rem auto 2.5rem;
    z-index: 10;
    position: relative;
}

.tab-button {
    padding: 0.8rem 1.8rem;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: #4a5568;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tab-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a75bb, #0f4b7e);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.tab-button:hover {
    color: white;
    transform: translateY(-2px);
}

.tab-button:hover::before {
    opacity: 1;
}

.tab-button.active {
    background: linear-gradient(135deg, #1a75bb, #0f4b7e);
    color: white;
    box-shadow: 0 4px 12px rgba(26, 117, 187, 0.3);
}

/* Tab Content */
.tab-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 2rem;
}

section {
    padding: 2.5rem;
}

.hidden-tab {
    display: none;
}

.active-tab {
    display: block;
}

section h2 {
    color: #0f4b7e;
    margin-bottom: 1.2rem;
    font-size: 2rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 0.8rem;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #1a75bb, #0f4b7e);
    border-radius: 2px;
}

section h3 {
    color: #1a75bb;
    margin: 1.8rem 0 1.2rem 0;
    font-size: 1.5rem;
    font-weight: 600;
    position: relative;
    padding-left: 1.2rem;
}

section h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, #1a75bb, #0f4b7e);
    border-radius: 2px;
}

section h4 {
    color: #2b6cb0;
    margin: 1.2rem 0 0.6rem 0;
    font-size: 1.2rem;
    font-weight: 600;
}

/* Calculator Styles */
.calculator-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
    margin-top: 1.8rem;
}

.input-section {
    flex: 1;
    min-width: 320px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e6f7ff 100%);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(26, 117, 187, 0.1);
}

.results-section {
    flex: 1;
    min-width: 320px;
    background: linear-gradient(135deg, #e6f7ff 0%, #d1e9ff 100%);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(26, 117, 187, 0.1);
}

.input-group {
    margin-bottom: 1.8rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 600;
    color: #2d3748;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #1a75bb;
}

.input-group select,
.input-group input {
    width: 100%;
    padding: 0.85rem;
    border: 2px solid #cbd5e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.input-group select:focus,
.input-group input:focus {
    outline: none;
    border-color: #1a75bb;
    box-shadow: 0 0 0 3px rgba(26, 117, 187, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, #1a75bb, #0f4b7e);
    color: white;
    border: none;
    padding: 0.9rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(26, 117, 187, 0.3);
    width: 100%;
    margin-top: 1rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 117, 187, 0.4);
    background: linear-gradient(135deg, #2b6cb0, #1a4c7e);
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(203, 213, 224, 0.5);
    transition: background-color 0.2s ease;
}

.result-item:hover {
    background-color: rgba(26, 117, 187, 0.05);
    border-radius: 4px;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.result-item.total {
    font-weight: bold;
    font-size: 1.3rem;
    border-top: 2px solid rgba(26, 117, 187, 0.3);
    margin-top: 0.8rem;
    padding-top: 1.2rem;
    background: linear-gradient(to right, rgba(26, 117, 187, 0.05), transparent);
    border-radius: 0 0 0 0;
}

#total-cost {
    font-size: 1.6rem;
    color: #e53e3e;
    font-weight: 700;
    background: linear-gradient(135deg, #e53e3e, #c53030);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Guide Styles */
.guide-section ul,
.housing-section ul,
.apps-section ul {
    list-style: none;
    padding-left: 0;
}

.guide-section li,
.housing-section li,
.apps-section li {
    padding: 0.8rem 0;
    padding-left: 1.8rem;
    position: relative;
    border-bottom: 1px solid rgba(237, 242, 247, 0.6);
    transition: all 0.2s ease;
}

.guide-section li:hover,
.housing-section li:hover,
.apps-section li:hover {
    background-color: rgba(26, 117, 187, 0.03);
    border-radius: 4px;
    padding-left: 2rem;
}

.guide-section li:last-child,
.housing-section li:last-child,
.apps-section li:last-child {
    border-bottom: none;
}

.guide-section li::before,
.housing-section li::before,
.apps-section li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #1a75bb;
    font-size: 1.8rem;
    line-height: 0.8;
    font-weight: bold;
}

.housing-option {
    margin-bottom: 2.2rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid rgba(237, 242, 247, 0.6);
    transition: transform 0.2s ease;
}

.housing-option:hover {
    transform: translateX(5px);
}

.housing-option:last-child {
    border-bottom: none;
}

.housing-option h4 {
    margin-top: 0;
    display: flex;
    align-items: center;
}

.housing-option h4::before {
    content: "🏠";
    margin-right: 0.8rem;
    font-size: 1.2rem;
}

.app-category {
    margin-bottom: 2.2rem;
}

.app-item {
    background: linear-gradient(135deg, #f0f9ff 0%, #e6f7ff 100%);
    padding: 1.2rem;
    border-radius: 8px;
    margin-bottom: 1.2rem;
    border-left: 4px solid #1a75bb;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.app-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.app-item h4 {
    color: #0f4b7e;
    margin-top: 0;
    display: flex;
    align-items: center;
}

.app-item h4::before {
    content: "📱";
    margin-right: 0.8rem;
    font-size: 1.1rem;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #0f4b7e, #1a75bb);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .calculator-container {
        flex-direction: column;
    }
    
    .tabs {
        flex-direction: column;
        align-items: stretch;
        margin: -2rem 20px 2.5rem;
    }
    
    .tab-button {
        width: 100%;
        border-radius: 8px;
        margin-bottom: 0.5rem;
    }
    
    header h1 {
        font-size: 2.2rem;
    }
    
    section {
        padding: 1.5rem;
    }
    
    header {
        padding: 2rem 0;
    }
    
    .input-section,
    .results-section {
        padding: 1.5rem;
    }
}

/* Additional decorative elements */
.icon-badge {
    display: inline-block;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #1a75bb, #0f4b7e);
    border-radius: 50%;
    color: white;
    text-align: center;
    line-height: 30px;
    font-weight: bold;
    margin-right: 0.5rem;
    font-size: 0.9rem;
}

/* Animation for sections */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

section {
    animation: fadeInUp 0.6s ease-out;
}

/* Card hover effect */
.tab-content {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tab-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}