/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* Paper Texture Effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 25% 25%, #B8B5FF 2px, transparent 2px),
        radial-gradient(circle at 75% 75%, #7868E6 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.1;
    pointer-events: none;
    z-index: -1;
}

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

/* Header Styles */
.header {
    background: linear-gradient(135deg, #7868E6, #B8B5FF);
    color: white;
    padding: 2rem 0;
    text-align: center;
    box-shadow: 0 4px 20px rgba(120, 104, 230, 0.3);
    position: sticky;
    top: 0;
    z-index: 150;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="0.5" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.8" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.header__title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.header__subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Header Logo */
.header__logo {
    display: inline-block;
    max-height: 64px;
    max-width: 180px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin-bottom: 0.75rem;
}

/* Navigation Styles */
.nav {
    background: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    margin-bottom: 80px;
}

.nav__list {
    display: flex;
    list-style: none;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem 0.5rem;
}

.nav__button {
    background: transparent;
    border: none;
    color: #7868E6;
    padding: 0.4rem 0.8rem;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.nav__button:hover { opacity: 0.85; }

.nav__button--active {
    background: #F0EEFF;
    color: #4f46e5;
}

/* Icon base */
.icon {
    width: 20px;
    height: 20px;
    display: inline-block;
}

.nav__label {
    font-size: 0.75rem;
}

/* Main Content */
.main {
    padding: 2rem 0 4.5rem;
    min-height: calc(100vh - 200px);
}

.section {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.section--active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Age Selector */
.age-selector {
    text-align: center;
    margin-bottom: 2rem;
}

.age-selector h2 {
    color: #7868E6;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.age-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.age-btn {
    background: white;
    border: 3px solid #B8B5FF;
    color: #7868E6;
    padding: 1rem 2rem;
    border-radius: 15px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(184, 181, 255, 0.2);
}

.age-btn:hover,
.age-btn.active {
    background: #7868E6;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(120, 104, 230, 0.4);
}

/* Timer Container */
.timer-container {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.timer-display {
    text-align: center;
    margin-bottom: 2rem;
}

.timer-circle {
    position: relative;
    width: 250px;
    height: 250px;
    margin: 0 auto;
}

.timer-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.timer-track {
    fill: none;
    stroke: #EDEEF7;
    stroke-width: 8;
}

.timer-progress {
    fill: none;
    stroke: #7868E6;
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 1s linear;
}

.timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    font-weight: 700;
    color: #7868E6;
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.timer-separator {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

.timer-info {
    text-align: center;
    margin-bottom: 2rem;
}

.timer-age-info {
    font-size: 1.2rem;
    color: #7868E6;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timer-recommendation {
    color: #666;
    font-style: italic;
}

/* Button Styles */
.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn--primary {
    background: #7868E6;
    color: white;
}

.btn--primary:hover:not(:disabled) {
    background: #6854d1;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(120, 104, 230, 0.4);
}

.btn--secondary {
    background: #B8B5FF;
    color: white;
}

.btn--secondary:hover:not(:disabled) {
    background: #a29eff;
    transform: translateY(-2px);
}

.btn--danger {
    background: #FFB4B4;
    color: #d63031;
}

.btn--danger:hover:not(:disabled) {
    background: #ff9999;
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.timer-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

/* Sound Controls */
.timer-sounds {
    border-top: 2px solid #EDEEF7;
    padding-top: 2rem;
}

.timer-sounds h3 {
    color: #7868E6;
    margin-bottom: 1rem;
    text-align: center;
}

.sound-controls {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.sound-btn {
    background: white;
    border: 2px solid #B8B5FF;
    color: #7868E6;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.sound-btn:hover,
.sound-btn.active {
    background: #B8B5FF;
    color: white;
}

.volume-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.volume-control input[type="range"] {
    width: 150px;
}

/* Temperature Section */
.temperature-display {
    text-align: center;
    margin-bottom: 2rem;
}

.temp-gauge {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    position: relative;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.temp-indicator {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #EDEEF7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.temp-scale {
    position: absolute;
    bottom: 1rem;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 2rem;
}

.temp-mark {
    font-size: 0.8rem;
    font-weight: 600;
}

.temp-mark--cold { color: #74b9ff; }
.temp-mark--ideal { color: #00b894; }
.temp-mark--hot { color: #e17055; }

.temperature-input {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    text-align: center;
}

.temperature-input label {
    display: block;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #7868E6;
}

.temperature-input input {
    padding: 0.8rem;
    border: 2px solid #B8B5FF;
    border-radius: 10px;
    font-size: 1.1rem;
    text-align: center;
    margin-right: 1rem;
    width: 120px;
}

.temp-rec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.temp-rec-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #7868E6;
}

.temp-rec-card h4 {
    color: #7868E6;
    margin-bottom: 0.5rem;
}

.temp-rec-card p:first-of-type {
    font-size: 1.2rem;
    font-weight: 700;
    color: #00b894;
    margin-bottom: 0.5rem;
}

/* Safety Section */
.safety-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.safety-category {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.safety-category h3 {
    color: #7868E6;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid #EDEEF7;
}

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

.checklist-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #7868E6;
}

.checklist-item label {
    flex: 1;
    cursor: pointer;
    transition: color 0.3s ease;
}

.checklist-item input:checked + label {
    color: #00b894;
    text-decoration: line-through;
}

.safety-progress {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #EDEEF7;
    border-radius: 10px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #7868E6, #B8B5FF);
    width: 0%;
    transition: width 0.5s ease;
}

.tips-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.tip-card {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #FFB4B4;
}

.tip-card h4 {
    color: #7868E6;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

/* Settings Section */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.settings-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.settings-card h3 {
    color: #7868E6;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.time-input-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.time-input-group input {
    padding: 0.5rem;
    border: 2px solid #B8B5FF;
    border-radius: 5px;
    width: 80px;
    text-align: center;
}

/* Switch Styles */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    margin-bottom: 1rem;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #7868E6;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.notification-settings label,
.audio-settings label {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.app-info {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.app-info h3 {
    color: #7868E6;
    margin-bottom: 1rem;
}

.app-info p {
    margin-bottom: 0.5rem;
}

/* Alert Styles */
.alert {
    padding: 1rem;
    border-radius: 10px;
    margin: 1rem 0;
    font-weight: 600;
    animation: slideIn 0.5s ease;
}

.alert--success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert--warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert--danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@keyframes slideIn {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
.black-bar {
position: fixed;
bottom: 0;
left: 0;
right: 0;
height: 30px;
background-color: #000000;
z-index: 1001;
}
/* Footer */
.footer {
    background: #7868E6;
    color: white;
    text-align: center;
    padding: 1.5rem 0 5.5rem;
    margin-top: 3rem;
margin-bottom: 80px;
}

.footer p {
    margin: 0;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header__title {
        font-size: 2rem;
    }
    .header__logo { max-height: 56px; max-width: 160px; }
    
    .nav__button { padding: 0.5rem; }
    
    .age-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .age-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .timer-circle {
        width: 200px;
        height: 200px;
    }
    
    .timer-text {
        font-size: 2.5rem;
    }
    
    .timer-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .timer-controls .btn {
        width: 100%;
        max-width: 200px;
        justify-content: center;
    }
    
    .sound-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .sound-btn {
        width: 100%;
        max-width: 200px;
        justify-content: center;
    }
    
    .settings-grid,
    .safety-categories,
    .temp-rec-grid {
        grid-template-columns: 1fr;
    }
    
    .volume-control {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .header__title {
        font-size: 1.8rem;
    }
    .header__logo { max-height: 48px; max-width: 140px; }
    
    .nav__label { display: none; }
    .icon { width: 22px; height: 22px; }
    
    .timer-container {
        padding: 1rem;
    }
    
    .timer-circle {
        width: 150px;
        height: 150px;
    }
    
    .timer-text {
        font-size: 2rem;
    }
    
    .settings-card,
    .safety-category,
    .timer-container {
        padding: 1.5rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

.slide-up {
    animation: slideUp 0.5s ease-in-out;
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.pulse {
    animation: pulse 2s infinite;
}

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

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.hidden { display: none; }
.visible { display: block; }

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #7868E6;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
