body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f5f7fa;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

/* BespokeBrush-style Header */
.bespoke-header {
    background: #ffffff;
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 80px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.brand-text h1 {
    color: #2c3e50;
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.tagline {
    color: #7f8c8d;
    font-size: 14px;
    margin: 2px 0 0 0;
    font-weight: normal;
}

/* Hamburger Menu Button */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background: #2c3e50;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-menu.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-menu.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Main Navigation */
.main-nav {
    display: flex;
    align-items: center;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.3s ease;
    border: none;
    background: none;
    cursor: pointer;
    white-space: nowrap;
    border-radius: 6px;
    margin: 0 5px;
}

.nav-link:hover {
    background: #f8f9fa;
    color: #3498db;
}

.dropdown-arrow {
    margin-left: 8px;
    font-size: 10px;
    transition: transform 0.3s ease;
}

.dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    list-style: none;
    padding: 8px 0;
    margin: 5px 0 0 0;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 12px 20px;
    color: #2c3e50;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: #f8f9fa;
    color: #3498db;
    padding-left: 25px;
}

.dropdown-item.active {
    background: #3498db;
    color: white;
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-nav.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-menu {
    position: absolute;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: #ffffff;
    list-style: none;
    padding: 80px 0 0 0;
    margin: 0;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.mobile-nav.active .mobile-nav-menu {
    transform: translateX(0);
}

.mobile-nav-item {
    border-bottom: 1px solid #f8f9fa;
}

.mobile-nav-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.3s ease;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.mobile-nav-link:hover {
    background: #f8f9fa;
    color: #3498db;
}

.mobile-arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.mobile-nav-item.active .mobile-arrow {
    transform: rotate(90deg);
}

.mobile-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #f8f9fa;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-nav-item.active .mobile-submenu {
    max-height: 300px;
}

.mobile-submenu-item {
    display: block;
    padding: 12px 40px;
    color: #2c3e50;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    border-bottom: 1px solid #e9ecef;
}

.mobile-submenu-item:last-child {
    border-bottom: none;
}

.mobile-submenu-item:hover {
    background: #e9ecef;
    color: #3498db;
}

.mobile-submenu-item.active {
    background: #3498db;
    color: white;
}

/* Mobile responsive header */
@media (max-width: 768px) {
    .header-content {
        padding: 15px 20px;
    }
    
    .hamburger-menu {
        display: flex;
    }
    
    .desktop-nav {
        display: none;
    }
    
    .mobile-nav {
        display: block;
    }
    
    .logo-section {
        flex: 1;
    }
    
    .brand-text h1 {
        font-size: 20px;
    }
    
    .tagline {
        font-size: 12px;
    }
}

@media (min-width: 769px) {
    .mobile-nav {
        display: none !important;
    }
}

/* Main Content Area */
.tab-content {
    display: none;
    padding: 30px;
    background: #fff;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

h2, h3 {
    color: #34495e;
    margin-top: 0;
}

.input-group {
    margin-bottom: 18px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #4a5568;
}

.input-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.input-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

button {
    background: #3498db;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: 10px;
}

button:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

/* Modal System */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-in-out;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    text-align: center;
    animation: slideIn 0.3s ease-out;
}

.modal-error {
    border-left: 4px solid #e74c3c;
    background: #fdf2f2;
}

.modal-info {
    border-left: 4px solid #3498db;
    background: #f8f9fa;
}

.modal-success {
    border-left: 4px solid #27ae60;
    background: #f0f9f0;
}

.modal-message {
    font-size: 16px;
    font-weight: 500;
    color: #2c3e50;
    line-height: 1.5;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Hide empty result sections by default */
.result:empty {
    display: none;
}

.result {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.bucket-returns, .bucket-allocation {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
    position: sticky;
    top: 0;
    z-index: 10;
}

tr:hover {
    background: #f8f9fa;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.result-item {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    text-align: center;
}

.result-item.highlight {
    background: #e8f4fd;
    border-color: #3498db;
}

.result-label {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 5px;
}

.result-value {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.result-highlight {
    font-size: 24px;
    font-weight: 700;
    color: #3498db;
    margin: 10px 0;
    padding: 15px;
    background: linear-gradient(135deg, #e8f4fd 0%, #d1ecf1 100%);
    border-radius: 8px;
    text-align: center;
    border: 2px solid #3498db;
}

.summary {
    background: #e8f4fd;
    padding: 15px;
    border-radius: 6px;
    margin-top: 15px;
}

.summary p {
    margin: 5px 0;
    font-weight: 500;
}

.table-container {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 400px;
    margin-top: 15px;
}

.warning {
    color: #e74c3c;
    font-weight: 500;
}

.success {
    color: #27ae60;
    font-weight: 500;
}

tr.depleted {
    background: #fdf2f2;
}

tr.depleted td {
    color: #e74c3c;
}

@media (max-width: 768px) {
    .container {
        margin: 0;
    }
    
    .tab-content {
        padding: 20px;
    }
    
    .result-item {
        padding: 10px;
    }
    
    .result-highlight {
        font-size: 20px;
        padding: 12px;
    }
    
    table {
        font-size: 12px;
    }
    
    th, td {
        padding: 8px 6px;
    }
}

.footer {
    margin-top: 40px;
    padding: 30px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 24px;
}

.footer h3 {
    color: #34495e;
    margin: 25px 0 15px 0;
    font-size: 18px;
}

.footer p {
    color: #555;
    line-height: 1.7;
    margin-bottom: 20px;
}

.calculator-features ul {
    list-style: none;
    padding: 0;
}

.calculator-features li {
    margin-bottom: 12px;
    padding-left: 20px;
    position: relative;
    color: #555;
}

.calculator-features li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: bold;
}

.disclaimer {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
    border-left: 4px solid #f39c12;
}

.disclaimer p {
    margin: 0;
    color: #7f8c8d;
}