/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #e0f7fa, #ffffff);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

header h1 {
    color: #0288d1;
    margin-bottom: 20px;
    font-size: 2.5rem;
}

/* Tab Menu */
.tab-menu {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    list-style: none;
    gap: 10px;
}

.tab {
    padding: 12px 20px;
    background: #b3e5fc;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.tab:hover {
    background: #81d4fa;
}

.tab.active {
    background: #0288d1;
    color: white;
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 0 auto;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Card Styles */
.card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card h2 {
    color: #0288d1;
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.card p {
    color: #666;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

/* Form Styles */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #01579b;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #b3e5fc;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #0288d1;
}

button {
    background: linear-gradient(to right, #0288d1, #00bcd4);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 200px;
}

button:hover {
    background: linear-gradient(to right, #01579b, #0097a7);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(2, 136, 209, 0.3);
}

/* Results */
.result {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    background: #e1f5fe;
    font-weight: 600;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.result.success {
    background: #c8e6c9;
    color: #388e3c;
}

.result.error {
    background: #ffcdd2;
    color: #d32f2f;
}

/* Burette Practice */
.burette-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.burette {
    width: 80px;
    height: 400px;
    position: relative;
}

.burette-top {
    width: 100%;
    height: 30px;
    background: #90caf9;
    border-radius: 10px 10px 0 0;
}

.burette-body {
    width: 100%;
    height: 340px;
    background: #bbdefb;
    border-left: 2px solid #0288d1;
    border-right: 2px solid #0288d1;
    position: relative;
    overflow: hidden;
}

.scale {
    position: absolute;
    left: -20px;
    top: 0;
    width: 20px;
    height: 100%;
    color: #01579b;
    font-size: 12px;
    font-weight: bold;
}

.scale div {
    position: absolute;
    right: 5px;
}

.burette-bottom {
    width: 100%;
    height: 30px;
    background: #90caf9;
    border-radius: 0 0 10px 10px;
}

.meniscus {
    position: absolute;
    bottom: 50%;
    left: 0;
    width: 100%;
    height: 20px;
    background: #0277bd;
    border-radius: 50%;
    opacity: 0.7;
}

.slider-container {
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.slider-container input {
    width: 100%;
    margin: 15px 0;
}

.reading {
    font-size: 1.2rem;
    font-weight: 600;
    color: #01579b;
}

.check-answer {
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 300px;
}

.check-answer input {
    flex: 1;
}

.check-answer button {
    flex: 0 0 auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .tab-menu {
        flex-direction: column;
        align-items: center;
    }
    
    .tab {
        width: 80%;
        text-align: center;
    }
    
    .card {
        padding: 20px;
    }
    
    .check-answer {
        flex-direction: column;
    }
    
    button {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .card {
        padding: 15px;
    }
    
    .card h2 {
        font-size: 1.5rem;
    }
}