        :root {
            --primary-color: #2c7da0;
            --secondary-color: #a9d6e5;
            --accent-color: #01497c;
            --light-gray: #f8f9fa;
            --border-color: #eaeaea;
            --text-color: #333;
            --text-muted: #6c757d;
            --success-color: #28a745;
            --warning-color: #ffc107;
            --danger-color: #dc3545;
            --medical-green: #198754;
            --medical-yellow: #ffc107;
            --medical-orange: #fd7e14;
            --bac-safe: #198754;
            --bac-caution: #ffc107;
            --bac-danger: #dc3545;
            --bac-extreme: #6f42c1;
        }
        /* Safety Tips Cards */
.safety-tips {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.safety-tip-card {
    background: white;
    border-radius: 8px;
    padding: 1.25rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.safety-tip-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.safety-tip-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background-color: rgba(44, 125, 160, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.25rem;
}

.safety-tip-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-size: 1.1rem;
}

.safety-tip-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    flex-grow: 1;
}

/* Different color variations for safety tips */
.safety-tip-card.warning {
    border-left: 4px solid var(--warning-color);
}

.safety-tip-card.warning .safety-tip-icon {
    background-color: rgba(255, 193, 7, 0.1);
    color: var(--warning-color);
}

.safety-tip-card.danger {
    border-left: 4px solid var(--danger-color);
}

.safety-tip-card.danger .safety-tip-icon {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
}

.safety-tip-card.success {
    border-left: 4px solid var(--success-color);
}

.safety-tip-card.success .safety-tip-icon {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
}

.safety-tip-card.info {
    border-left: 4px solid var(--primary-color);
}

.safety-tip-card.info .safety-tip-icon {
    background-color: rgba(44, 125, 160, 0.1);
    color: var(--primary-color);
}
/* Legal Limits Cards */
.legal-limits {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.25rem;
    margin: 1.5rem 0;
}

.legal-limit-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.legal-limit-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-color);
    opacity: 0.7;
}

.legal-limit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.legal-limit-card.usa {
    border-color: rgba(220, 53, 69, 0.2);
}

.legal-limit-card.usa::before {
    background: #dc3545;
}

.legal-limit-card.international {
    border-color: rgba(40, 167, 69, 0.2);
}

.legal-limit-card.international::before {
    background: #28a745;
}

.legal-limit-card.commercial {
    border-color: rgba(255, 193, 7, 0.2);
}

.legal-limit-card.commercial::before {
    background: #ffc107;
}

.legal-limit-card.zero-tolerance {
    border-color: rgba(108, 117, 125, 0.2);
}

.legal-limit-card.zero-tolerance::before {
    background: #6c757d;
}

.legal-limit-value {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
    line-height: 1;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

.legal-limit-card.usa .legal-limit-value {
    color: #dc3545;
}

.legal-limit-card.international .legal-limit-value {
    color: #28a745;
}

.legal-limit-card.commercial .legal-limit-value {
    color: #ffc107;
}

.legal-limit-card.zero-tolerance .legal-limit-value {
    color: #6c757d;
}

.legal-limit-location {
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-size: 1.1rem;
}

.legal-limit-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    max-width: 90%;
}

.legal-limit-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 0.5rem;
    border-top: 1px dashed var(--border-color);
    padding-top: 0.5rem;
    width: 100%;
}

.legal-limit-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.2rem;
    color: rgba(0, 0, 0, 0.1);
    z-index: 0;
}

.legal-limit-card:hover .legal-limit-icon {
    color: rgba(0, 0, 0, 0.15);
    transform: scale(1.1);
    transition: all 0.3s ease;
}

/* Responsive adjustments for legal limits */
@media (max-width: 992px) {
    .legal-limits {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 1rem;
    }
    
    .legal-limit-card {
        padding: 1.25rem;
    }
    
    .legal-limit-value {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .legal-limits {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .legal-limit-card {
        padding: 1rem;
    }
    
    .legal-limit-value {
        font-size: 2rem;
    }
    
    .legal-limit-location {
        font-size: 1rem;
    }
    
    .legal-limit-desc {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .legal-limits {
        grid-template-columns: 1fr;
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .legal-limit-card {
        padding: 1.5rem;
    }
    
    .legal-limit-value {
        font-size: 2.5rem;
    }
}
/* Responsive adjustments for safety tips */
@media (max-width: 768px) {
    .safety-tips {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 0.75rem;
    }
    
    .safety-tip-card {
        padding: 1rem;
    }
    
    .safety-tip-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .safety-tip-title {
        font-size: 1rem;
    }
    
    .safety-tip-desc {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .safety-tips {
        grid-template-columns: 1fr;
    }
}
        /* Error range styles */
        .error-range {
            font-size: 0.9rem;
            color: var(--text-muted);
            margin-top: 0.5rem;
        }
        
        .error-bar {
            height: 4px;
            background: linear-gradient(90deg, #e9ecef 0%, var(--primary-color) 50%, #e9ecef 100%);
            border-radius: 2px;
            margin: 0.5rem 0;
            position: relative;
        }
        
        .error-marker {
            position: absolute;
            width: 3px;
            height: 12px;
            background: var(--primary-color);
            top: -4px;
            left: 50%;
            transform: translateX(-50%);
        }
        
        /* Metabolism rate adjuster styles */
        .metabolism-slider-container {
            background: white;
            border-radius: 8px;
            padding: 1.5rem;
            margin: 1.5rem 0;
            border: 1px solid var(--border-color);
        }
        
        .slider-value-display {
            font-size: 1.25rem;
            font-weight: 600;
            color: var(--primary-color);
            text-align: center;
            margin: 0.5rem 0;
        }
        
        .metabolism-info-box {
            background-color: rgba(44, 125, 160, 0.05);
            border-radius: 6px;
            padding: 1rem;
            margin: 1rem 0;
        }
        
        /* More drink options styles */
        .drink-types-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
            gap: 0.75rem;
            margin: 1rem 0;
        }
        
        .drink-type-mini {
            background: white;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            padding: 0.75rem;
            text-align: center;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .drink-type-mini:hover {
            border-color: var(--primary-color);
            transform: translateY(-2px);
        }
        
        .drink-type-mini.selected {
            border: 2px solid var(--primary-color);
            background-color: rgba(44, 125, 160, 0.05);
        }
        
        .drink-mini-icon {
            font-size: 1.25rem;
            margin-bottom: 0.25rem;
            color: var(--primary-color);
        }
        
        .drink-mini-name {
            font-size: 0.8rem;
            font-weight: 500;
            margin-bottom: 0.25rem;
        }
        
        .drink-mini-details {
            font-size: 0.7rem;
            color: var(--text-muted);
        }
        
        /* Absorption time adjustment */
        .absorption-slider {
            width: 100%;
        }
        
        .advanced-settings {
            margin: 1.5rem 0;
            padding: 1.5rem;
            background: white;
            border-radius: 8px;
            border: 1px solid var(--border-color);
        }
        
        .advanced-toggle {
            cursor: pointer;
            color: var(--primary-color);
            font-weight: 600;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        
        .advanced-content {
            margin-top: 1rem;
            display: none;
        }
        
        .advanced-content.show {
            display: block;
        }
        
        /* Accuracy note box */
        .accuracy-note {
            background-color: rgba(255, 193, 7, 0.1);
            border-left: 3px solid var(--warning-color);
            padding: 1rem;
            border-radius: 0 4px 4px 0;
            margin: 1rem 0;
        }
        
        .accuracy-item {
            display: flex;
            align-items: flex-start;
            margin-bottom: 0.5rem;
        }
        
        .accuracy-item:last-child {
            margin-bottom: 0;
        }
        
        .accuracy-icon {
            color: var(--warning-color);
            margin-right: 0.5rem;
            flex-shrink: 0;
        }
        
        /* Drink search box */
        .drink-search {
            margin-bottom: 1rem;
        }
        
        /* Drink category tabs */
        .drink-category-tabs {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            margin-bottom: 1rem;
        }
        
        .drink-category-tab {
            padding: 0.5rem 1rem;
            background: var(--light-gray);
            border-radius: 20px;
            font-size: 0.85rem;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .drink-category-tab.active {
            background: var(--primary-color);
            color: white;
        }
        
        /* Error chart */
        .error-chart-container {
            height: 200px;
            margin: 1.5rem 0;
        }
        
        /* Individual difference note */
        .individual-difference-note {
            background-color: rgba(108, 117, 125, 0.1);
            border-left: 3px solid #6c757d;
            padding: 1rem;
            border-radius: 0 4px 4px 0;
            margin: 1rem 0;
            font-size: 0.9rem;
        }
        
        /* Absorption time effect explanation */
        .absorption-info {
            background-color: rgba(40, 167, 69, 0.1);
            border-left: 3px solid var(--success-color);
            padding: 1rem;
            border-radius: 0 4px 4px 0;
            margin: 1rem 0;
        }
        
        /* BAC Gauge */
        .bac-gauge {
            position: relative;
            width: 100%;
            max-width: 400px;
            margin: 0 auto 2rem;
        }
        
        .gauge-container {
            position: relative;
            height: 200px;
            overflow: hidden;
        }
        
        .gauge-background {
            position: absolute;
            width: 100%;
            height: 100px;
            border-radius: 200px 200px 0 0;
            overflow: hidden;
            background: linear-gradient(90deg, var(--bac-safe) 0%, var(--bac-caution) 33%, var(--bac-danger) 66%, var(--bac-extreme) 100%);
        }
        
        .gauge-mask {
            position: absolute;
            width: 80%;
            height: 80px;
            background: white;
            border-radius: 200px 200px 0 0;
            bottom: 0;
            left: 10%;
        }
        
        .gauge-needle {
            position: absolute;
            width: 4px;
            height: 100px;
            background: #333;
            bottom: 0;
            left: 50%;
            transform-origin: bottom center;
            transform: translateX(-50%) rotate(0deg);
            transition: transform 1s ease;
            z-index: 2;
        }
        
        .gauge-needle-head {
            position: absolute;
            width: 20px;
            height: 20px;
            background: #333;
            border-radius: 50%;
            top: 0;
            left: 50%;
            transform: translateX(-50%);
        }
        
        .gauge-labels {
            display: flex;
            justify-content: space-between;
            margin-top: 10px;
        }
        
        .gauge-label {
            font-size: 0.8rem;
            color: var(--text-muted);
        }
        
        .bac-value-display {
            text-align: center;
            margin-top: 1.5rem;
        }
        
        .bac-number {
            font-size: 3rem;
            font-weight: 700;
            margin-bottom: 0.5rem;
        }
        
        .bac-status {
            font-size: 1.5rem;
            font-weight: 600;
            padding: 0.5rem 1rem;
            border-radius: 30px;
            display: inline-block;
        }
        
        /* Drink Entry */
        .drink-entry {
            background: white;
            border-radius: 8px;
            padding: 1rem;
            border: 1px solid var(--border-color);
            margin-bottom: 1rem;
            position: relative;
        }
        
        .drink-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1rem;
        }
        
        .drink-type-select {
            width: 100%;
        }
        
        .drink-remove {
            position: absolute;
            top: 10px;
            right: 10px;
            background: none;
            border: none;
            color: var(--danger-color);
            cursor: pointer;
        }
        
        /* BAC Effects Table */
        .effects-table {
            width: 100%;
            border-collapse: collapse;
            margin: 1.5rem 0;
        }
        
        .effects-table th, .effects-table td {
            padding: 0.75rem;
            text-align: left;
            border: 1px solid var(--border-color);
        }
        
        .effects-table th {
            background-color: var(--light-gray);
            font-weight: 600;
        }
        
        .effects-table tr.active {
            background-color: rgba(44, 125, 160, 0.1);
            font-weight: 600;
        }
        
        .effects-table .bac-range {
            font-weight: 600;
        }
        
        /* Timeline */
        .timeline-container {
            position: relative;
            height: 120px;
            margin: 2rem 0;
            overflow-x: auto;
            overflow-y: hidden;
        }
        
        .timeline {
            position: relative;
            height: 60px;
            min-width: 800px;
            border-bottom: 2px solid #ddd;
        }
        
        .timeline-marker {
            position: absolute;
            bottom: 0;
            width: 2px;
            height: 20px;
            background: #999;
            transform: translateX(-50%);
        }
        
        .timeline-marker.current {
            background: var(--primary-color);
            height: 30px;
            width: 3px;
        }
        
        .timeline-marker-label {
            position: absolute;
            top: 25px;
            left: 50%;
            transform: translateX(-50%);
            font-size: 0.8rem;
            color: var(--text-muted);
            white-space: nowrap;
        }
        
        .timeline-bac-point {
            position: absolute;
            width: 12px;
            height: 12px;
            border-radius: 50%;
            bottom: -5px;
            transform: translateX(-50%);
            background: var(--primary-color);
            border: 2px solid white;
            box-shadow: 0 0 0 2px var(--primary-color);
        }
        
        /* Content Sections */
        .section-title {
            font-weight: 600;
            margin-bottom: 1rem;
            color: var(--primary-color);
            padding-bottom: 0.5rem;
            border-bottom: 1px solid var(--border-color);
        }
        
        .info-box {
            background-color: rgba(44, 125, 160, 0.05);
            border-left: 3px solid var(--primary-color);
            padding: 1rem;
            border-radius: 0 4px 4px 0;
            margin: 1.5rem 0;
        }
        
        .warning-box {
            background-color: rgba(255, 193, 7, 0.1);
            border-left: 3px solid var(--warning-color);
            padding: 1rem;
            border-radius: 0 4px 4px 0;
            margin: 1.5rem 0;
        }
        
        .danger-box {
            background-color: rgba(220, 53, 69, 0.1);
            border-left: 3px solid var(--danger-color);
            padding: 1rem;
            border-radius: 0 4px 4px 0;
            margin: 1.5rem 0;
        }
        
        /* Clear time estimation */
        .clear-time {
            text-align: center;
            padding: 1.5rem;
            background: white;
            border-radius: 8px;
            border: 1px solid var(--border-color);
            margin: 1.5rem 0;
        }
        
        .clear-time-value {
            font-size: 2rem;
            font-weight: 700;
            color: var(--primary-color);
            margin-bottom: 0.5rem;
        }
        
        .clear-time-label {
            color: var(--text-muted);
            font-size: 0.9rem;
        }
        
        /* BAC classification */
        .bac-classification {
            padding: 1rem;
            border-radius: 8px;
            margin: 1rem 0;
            border-left: 5px solid;
        }
        
        .bac-safe {
            background-color: rgba(25, 135, 84, 0.1);
            border-left-color: var(--bac-safe);
        }
        
        .bac-caution {
            background-color: rgba(255, 193, 7, 0.1);
            border-left-color: var(--bac-caution);
        }
        
        .bac-danger {
            background-color: rgba(220, 53, 69, 0.1);
            border-left-color: var(--bac-danger);
        }
        
        .bac-extreme {
            background-color: rgba(111, 66, 193, 0.1);
            border-left-color: var(--bac-extreme);
        }
        
        /* Body styles */
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background-color: white;
            color: var(--text-color);
            line-height: 1.6;
        }
        
        .container {
            max-width: 1200px;
        }
        
        /* Header Styles */
        .navbar {
            background-color: white;
            box-shadow: 0 2px 4px rgba(0,0,0,0.05);
            border-bottom: 1px solid var(--border-color);
            padding: 0.75rem 0;
        }
        
        .navbar-brand {
            font-weight: 700;
            color: var(--primary-color);
            font-size: 1.5rem;
        }
        
        .nav-link {
            color: #555;
            font-weight: 500;
            padding: 0.5rem 1rem;
            border-radius: 6px;
        }
        
        .nav-link:hover, .nav-link.active {
            color: var(--primary-color);
            background-color: rgba(44, 125, 160, 0.1);
        }
        
        .page-header {
            background: linear-gradient(135deg, rgba(169, 214, 229, 0.4) 0%, rgba(44, 125, 160, 0.4) 100%);
            padding: 1.5rem 0;
            margin-bottom: 2rem;
            border-bottom: 1px solid rgba(44, 125, 160, 0.2);
            position: relative;
            overflow: hidden;
        }
        
        .page-header::before {
            content: "";
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background-image: radial-gradient(rgba(255,255,255,0.8) 1px, transparent 1px);
            background-size: 20px 20px;
            opacity: 0.3;
            transform: rotate(30deg);
        }
        
        .breadcrumb {
            background-color: transparent;
            padding: 0.5rem 0;
            margin-bottom: 0.5rem;
        }
        
        .breadcrumb-item a {
            color: var(--text-muted);
            text-decoration: none;
        }
        
        .breadcrumb-item.active {
            color: var(--text-color);
        }
        
        /* Tool Card Styles */
        .tool-card {
            background: white;
            border-radius: 8px;
            border: 1px solid var(--border-color);
            padding: 2rem;
            margin-bottom: 1.5rem;
            box-shadow: 0 2px 10px rgba(0,0,0,0.05);
        }
        
        .tool-header {
            position: relative;
            padding-bottom: 15px;
            margin-bottom: 25px;
            border-bottom: 1px solid var(--border-color);
        }
        
        .tool-header h2 {
            font-weight: 600;
            color: var(--primary-color);
            margin-bottom: 0.5rem;
        }
        
        /* Form Styles */
        .form-label {
            font-weight: 600;
            margin-bottom: 0.5rem;
            color: var(--text-color);
        }
        
        .form-control {
            border: 1px solid #ddd;
            border-radius: 6px;
            padding: 0.75rem;
            transition: all 0.3s;
        }
        
        .form-control:focus {
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(44, 125, 160, 0.15);
        }
        
        .input-group-text {
            background-color: var(--light-gray);
            border: 1px solid #ddd;
        }
        
        .btn-primary {
            background-color: var(--primary-color);
            border-color: var(--primary-color);
            font-weight: 600;
            padding: 0.75rem 1.5rem;
            border-radius: 6px;
            transition: all 0.3s;
        }
        
        .btn-primary:hover {
            background-color: var(--accent-color);
            border-color: var(--accent-color);
            transform: translateY(-1px);
        }
        
        .btn-outline-secondary {
            font-weight: 600;
            border-radius: 6px;
            padding: 0.75rem 1.5rem;
        }
        
        /* Result Area */
        .result-container {
            background-color: var(--light-gray);
            border-radius: 6px;
            padding: 1.5rem;
            margin-top: 1.5rem;
            position: relative;
            border: 1px solid var(--border-color);
        }
        
        .result-title {
            font-weight: 600;
            margin-bottom: 0.75rem;
            color: var(--primary-color);
        }
        
        /* Footer */
        .footer {
            background-color: var(--light-gray); 
            margin-top: 3rem;
            border-top: 1px solid var(--border-color);
        }
        
        /* Responsive Adjustments */
        @media (max-width: 768px) {
            .tool-card {
                padding: 1.5rem;
            }
            
            .bac-number {
                font-size: 2.5rem;
            }
            
            .bac-status {
                font-size: 1.25rem;
            }
        }
        
        /* Action buttons */
        .action-btn {
            background-color: white;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            padding: 0.5rem 1rem;
            margin-left: 0.5rem;
            transition: all 0.3s;
            color: var(--text-color);
        }
        
        .action-btn:hover {
            background-color: var(--light-gray);
            color: var(--primary-color);
        }
    