 /* Base Styles */
 body {
    font-family: 'Arial', sans-serif;
    background-color: #fff;
    margin: 0;
    padding: 20px;
    color: #333;
    padding-bottom: 70px; /* Space for bottom nav */
    user-select: none;
}


*{
 -webkit-tap-highlight-color: transparent;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
}

h1, h2 {
    color: #2d3748;
}

#theme {
    height: 40px;
    width: 100%;
    background-color: #000;
    border-radius: 6px;
    font-family: 'Arial', sans-serif;
    color: #fff;
    font-size: medium;
    border: 1px solid #000;
    cursor: pointer;
    transition: all 0.3s ease-in-out;

}



#theme:hover {
    background-color: #fff;
    color: #000;
}

#margins {
    height: 20px;
}

#bedtime {
    width: 90%;
}

#wakeup{
    width: 90%;
}

/* Content Sections */
.content-section {
    display: none;
    padding: 10px;
}

.content-section.active {
    display: block;
    overflow-y: scroll;
}

/* Input Form */
.input-section {
    background: transparent;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    margin-top: 50px;
    overflow-x: hidden;
}

/* Quality Range Styles */
.quality-range {
    margin: 15px 0;
    width: 100%;
}

#quality-markers {
 
   
    margin-top: 10px;
    padding-right: 30px;
}

.quality-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.8rem;
    color: #666;
}

input[type="range"] {
    -webkit-appearance: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #e0e0e0;
    outline: none;
    padding: 0;
    margin: 10px 0;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #000;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input[type="range"]::-moz-range-thumb {
    width: 27px;
    height: 27px;
    border-radius: 50%;
    background: #000;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.quality-value {
    text-align: center;
    font-weight: bold;
    margin-top: 5px;
    font-size: 0.9rem;
}

/* For datalist markers (not supported in all browsers) */
datalist {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: -20px;
}

/* Dark mode adjustments */
.dark-mode input[type="range"] {
    background: #4a5568;
}

.dark-mode input[type="range"]::-webkit-slider-thumb {
    background: #f7fafc;
    border: 2px solid #2d3748;
}

form {
    display: grid;
    gap: 10px;
}

.form-group {
    margin-top: 40px;
}

input, button {
    padding: 8px;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
}

button[type="submit"] {
    background: #000;
    color: white;
    cursor: pointer;
    border: 1px solid #000;
    transition: all 0.3s ease-in-out;
}

button[type="submit"]:hover {
    background: #fff;
    color: #000;
}


/* Stats Card */
.stats-card {
    background: transparent;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Sleep Entries Cards */
.entries-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sleep-entry-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.entry-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.entry-label {
    font-weight: bold;
    color: #4a5568;
}

.entry-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.delete-btn {
    background: #000;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    border: 1px solid   #000;
    transition: all 0.4s ease-in-out
}

.delete-btn:hover {
    background: #fff;
    color: #000;
}


#sleep-score-container {
    position: relative;
    width: 150px;
    height: 150px;
    margin: auto;
  }
  #sleep-score-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.4rem;
    font-weight: bold;
  }


/* Chart Section - Made larger */
#chart-section {
    height: 400px; /* Increased from 300px */
    width: 100%;
    min-height: 60vh; /* Will take at least 60% of viewport height */
    position: relative;
}

#sleep-chart {
    width: 100% !important;
    height: 70% !important;
    
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
    z-index: 100;
}

.nav-btn {
    background: none;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: gray;
    font-size: 14px;
}

.nav-btn:hover {
    background-color: rgba(0,0,0,0.09);
}

.nav-btn.active {
    color: #121212;
    font-weight: bold;
}

.nav-btn span {
    font-size: 20px;
    margin-bottom: 5px;
}

/* Hide table elements since we're using cards */
table {
    display: none;
}

/* Mobile-specific adjustments */
@media (max-width: 600px) {
    #chart-section {
        height: 70vh; /* Even larger on small screens */
        min-height: 400px; /* Minimum height */
    }
    
    .container {
        padding: 15px;
    }
    
    .sleep-entry-card {
        padding: 12px;
    }

    #paglu {
        height: 300px;
        width: 95%;
        background-color: #fafafa;
        border-radius: 12px;
        border: 1px solid #000;
        margin-top: 65px;
    }

    input[type="range"] {
        -webkit-appearance: none;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 8px;
        border-radius: 4px;
        background: #e0e0e0;
        outline: none;
        padding: 0;
        margin: 10px 0;
    }
    
    input[type="range"]::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background: #000;
        cursor: pointer;
        border: 2px solid #fff;
        box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    }
    
    input[type="range"]::-moz-range-thumb {
        width: 27px;
        height: 27px;
        border-radius: 50%;
        background: #000;
        cursor: pointer;
        border: 2px solid #fff;
        box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    }

    #special-mobile-optimize {
     height:30px;
    }
}
