* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #1a2a6c, #2c3e50, #3498db);
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
header {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 5%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo h1 {
    font-size: 1.8rem;
    color: #2c3e50;
}

.logo i {
    color: #3498db;
    font-size: 2rem;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

nav a {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.3s;
    position: relative;
}

nav a:hover,
nav a.active {
    color: #3498db;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #3498db;
    transition: width 0.3s;
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

/* Main Content Styles */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px;
}

.container {
    width: 100%;
    max-width: 500px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
}

.article-section {
    width: 100%;
    max-width: 800px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.article-section h2 {
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.article-content {
    line-height: 1.6;
}

.article-content p {
    margin-bottom: 15px;
    color: #444;
}

.article-tips {
    background: linear-gradient(135deg, #f5f7fa, #e4e8f0);
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #3498db;
}

.article-tips h3,
.article-tips h4 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.article-tips ul {
    padding-left: 20px;
    margin-bottom: 10px;
}

.article-tips li {
    margin-bottom: 8px;
}

.article-tips ol {
    padding-left: 20px;
    margin-bottom: 10px;
}

.article-content ul,
.article-content ol {
    padding-left: 20px;
    margin-bottom: 15px;
}

.article-content li {
    margin-bottom: 8px;
}

/* Footer Styles */
footer {
    background: rgba(26, 42, 108, 0.9);
    color: white;
    padding: 30px 5%;
    margin-top: auto;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
}

.footer-section {
    flex: 1;
    min-width: 200px;
}

.footer-section h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 5px;
    display: inline-block;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #e0e0e0;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Timer Styles */
.nav-menu {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
    gap: 10px;
}

.nav-btn {
    padding: 8px 12px;
    background: linear-gradient(135deg, #6c5ce7, #3498db);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 25px;
    border-radius: 12px;
    max-width: 90%;
    width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.modal-title {
    font-size: 1.4rem;
    color: #2c3e50;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #7f8c8d;
}

.modal-body {
    line-height: 1.6;
}

.modal-body h3 {
    margin: 15px 0 8px 0;
    color: #2c3e50;
}

.modal-body ul {
    padding-left: 20px;
    margin-bottom: 15px;
}

.modal-body li {
    margin-bottom: 5px;
}

.ad-space {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 8px;
    padding: 8px;
    margin: 8px 0;
    text-align: center;
    border: 1px dashed #ccc;
    color: #6c757d;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-space.banner {
    height: 90px;
    margin: 12px auto;
}

.timer-header {
    text-align: center;
    padding: 0 0 8px 0;
    margin-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.timer-header h2 {
    font-size: 1.6rem;
    margin-bottom: 4px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.timer-header p {
    font-size: 0.85rem;
    color: #666;
}

.complete-set-btn {
    display: block;
    width: 100%;
    padding: 14px;
    margin: 0 0 12px 0;
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.complete-set-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 6px rgba(46, 204, 113, 0.3);
}

.complete-set-btn.pulse {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.stat-box {
    background: linear-gradient(135deg, #f5f7fa, #e4e8f0);
    padding: 10px 8px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
    margin: 3px 0;
}

.stat-label {
    color: #666;
    font-size: 0.75rem;
    font-weight: 600;
}

.time-display {
    text-align: center;
    margin: 10px 0;
    padding: 10px 8px;
    background: linear-gradient(135deg, #f5f7fa, #e4e8f0);
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.time-value {
    font-size: 2rem;
    font-weight: bold;
    color: #3498db;
    margin: 4px 0;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.time-label {
    color: #666;
    font-size: 0.85rem;
    font-weight: 600;
}

.exercise-feedback {
    text-align: center;
    margin: 10px 0;
    padding: 8px;
    background: rgba(46, 204, 113, 0.1);
    border-radius: 6px;
    border-left: 3px solid #2ecc71;
    font-weight: 600;
    color: #27ae60;
    font-size: 0.8rem;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.exercise-feedback.visible {
    opacity: 1;
}

.exercise-feedback.warning {
    background: rgba(231, 76, 60, 0.1);
    border-left: 3px solid #e74c3c;
    color: #c0392b;
}

.control-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 12px 0 10px 0;
}

button {
    padding: 12px 8px;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

button:active {
    transform: translateY(1px);
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.btn-sensor {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    grid-column: span 2;
    margin-top: 6px;
}

.btn-sensor.off {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
}

.sensor-section {
    margin: 12px 0 10px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.sensor-visualization {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.depth-sensor {
    width: 100%;
    height: 80px;
    background: linear-gradient(to right, #2c3e50, #3498db, #2ecc71);
    border-radius: 6px;
    position: relative;
    overflow: hidden;
    margin-bottom: 6px;
}

.depth-bar {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 75%;
    background: rgba(255, 255, 255, 0.3);
    transition: height 0.5s ease;
}

.depth-marker {
    position: absolute;
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.7);
    bottom: 25%;
}

.sensor-data {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: 6px;
}

.data-item {
    text-align: center;
    font-size: 0.7rem;
    color: #2c3e50;
    font-weight: 600;
}

.data-value {
    font-size: 0.8rem;
    color: #3498db;
    font-weight: bold;
}

.timer-footer {
    text-align: center;
    margin-top: 12px;
    color: #666;
    font-size: 0.7rem;
    padding: 8px 0 0 0;
    border-top: 1px solid #f0f0f0;
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }
    
    nav ul {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .footer-section {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .timer-header h2 {
        font-size: 1.4rem;
    }
    
    .stat-value {
        font-size: 1.3rem;
    }
    
    .time-value {
        font-size: 1.7rem;
    }
    
    button {
        padding: 10px 6px;
        font-size: 0.8rem;
    }
    
    .complete-set-btn {
        padding: 12px;
        font-size: 0.9rem;
    }
    
    .nav-btn {
        padding: 6px 8px;
        font-size: 0.75rem;
    }
    
    .article-section {
        padding: 15px;
    }
    
    .article-section h2 {
        font-size: 1.4rem;
    }
}
