/* Sleep Calculator Specific Styles */

/* Sleep Calculator Color Scheme - Deep Midnight Blue & Soft Lavender Purple */
:root {
    --sleep-primary: #0B3D91;      /* Deep Midnight Blue */
    --sleep-secondary: #A890FE;    /* Soft Lavender Purple */
    --sleep-accent: #8B7CE6;       /* Medium purple accent */
    --sleep-light: #F0EFFF;        /* Very light lavender */
    --sleep-text: #0B3D91;         /* Deep midnight blue text */
    --sleep-muted: #4A5568;        /* Darker gray text for better contrast */
    --sleep-success: #10B981;      /* Green for positive results */
    --sleep-bg: #FAFAFF;           /* Light background with purple tint */
    --sleep-white: #FFFFFF;
}

/* Smart Sleep Calculator Section */
.sleep-calculator-section {
    padding: 2rem 0;
    background: linear-gradient(135deg, var(--sleep-bg) 0%, var(--sleep-light) 100%);
    min-height: 600px;
    contain: layout;
}

.calculator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 0 auto;
    align-items: stretch; /* Equal height sections */
    contain: layout;
}

/* Visual Section - Left */
.visual-section {
    display: flex;
    flex-direction: column;
}

.visual-card {
    background: var(--sleep-white);
    border-radius: 4px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(11, 61, 145, 0.1);
    text-align: center;
    height: 100%; /* Equal height */
    display: flex;
    flex-direction: column;
    min-height: 500px;
    contain: layout style;
}

.main-heading {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--sleep-primary);
    margin: 0 0 1.5rem 0;
    text-align: center;
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--sleep-primary);
    margin: 0 0 0.3rem 0;
}

.card-subtitle {
    font-size: 0.8rem;
    color: #4A5568;
    margin: 0 0 1.5rem 0;
}

.action-buttons {
    text-align: center;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
}

.calc-btn {
    width: 100%;
    padding: 0.7rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.calc-btn.primary {
    background: linear-gradient(135deg, var(--sleep-primary) 0%, var(--sleep-secondary) 100%) !important;
    color: var(--sleep-white) !important;
}

.calc-btn.secondary {
    background: linear-gradient(135deg, var(--sleep-muted) 0%, #6b7280 100%) !important;
    color: var(--sleep-white) !important;
}

.calc-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(30, 58, 138, 0.25);
}

.alt-text {
    font-size: 0.8rem;
    color: #4A5568;
    margin: 0.8rem 0 0.5rem 0;
    font-style: italic;
}

.visual-results {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--sleep-bg);
    border-radius: 4px;
    border: 1px solid var(--sleep-light);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    text-align: left;
}

.result-header {
    margin-bottom: 1rem;
}

.result-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--sleep-primary);
    margin: 0 0 0.5rem 0;
}

.result-note {
    font-size: 0.8rem;
    color: #4A5568;
    margin: 0;
    font-style: italic;
}

.result-intro {
    font-size: 0.85rem;
    color: var(--sleep-text);
    margin: 0 0 1rem 0;
    line-height: 1.4;
}

.time-options {
    margin-bottom: 1rem;
}

.time-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    margin-bottom: 0.4rem;
    background: var(--sleep-white);
    border: 1px solid var(--sleep-light);
    border-radius: 4px;
    transition: all 0.2s ease;
    gap: 2rem;
}

.time-option:hover {
    border-color: var(--sleep-secondary);
    background: rgba(139, 92, 246, 0.05);
}

.time-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--sleep-primary);
}

.time-cycles {
    font-size: 0.8rem;
    color: var(--sleep-secondary);
    font-weight: 600;
    margin-top: 0.2rem;
    text-align: right;
}

.time-label {
    font-size: 0.7rem;
    color: var(--sleep-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sleep-cycle-note {
    font-size: 0.8rem;
    color: #4A5568;
    line-height: 1.4;
    margin: 0;
}

.go-back-btn {
    width: 100%;
    padding: 0.7rem 1rem;
    background: linear-gradient(135deg, var(--sleep-muted) 0%, #6b7280 100%);
    color: var(--sleep-white);
    border: none;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 1rem;
}

.go-back-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(107, 114, 128, 0.3);
}

/* Smart Section - Right */
.smart-section {
    display: flex;
    flex-direction: column;
}

.smart-card {
    background: var(--sleep-white);
    border-radius: 4px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(11, 61, 145, 0.1);
    height: 100%; /* Equal height */
    display: flex;
    flex-direction: column;
    min-height: 500px;
    contain: layout style;
}

.smart-form {
    margin-bottom: 1.5rem;
}

.form-row {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--sleep-text);
    margin-bottom: 0.4rem;
}

.form-input {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1px solid var(--sleep-light);
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    background: var(--sleep-white);
    transition: all 0.2s ease;
    color: var(--sleep-primary);
}

.form-input:focus {
    outline: none;
    border-color: var(--sleep-secondary);
    box-shadow: 0 0 0 2px rgba(168, 144, 254, 0.1);
}

/* Time input specific styling for main section */
.visual-section .form-input {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--sleep-primary);
    cursor: pointer;
    position: relative;
}

.visual-section .form-input:hover {
    border-color: var(--sleep-secondary);
    box-shadow: 0 0 0 2px rgba(168, 144, 254, 0.1);
}

/* Make time input fully clickable */
.visual-section .form-input[type="time"] {
    -webkit-appearance: none;
    -moz-appearance: textfield;
    appearance: none;
    background: var(--sleep-white);
    position: relative;
}

.visual-section .form-input[type="time"]::-webkit-calendar-picker-indicator {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    height: auto;
    color: transparent;
    background: transparent;
    cursor: pointer;
    z-index: 2;
}

.visual-section .form-input[type="time"]::-webkit-inner-spin-button {
    display: none;
}

.visual-section .form-input[type="time"]::-webkit-clear-button {
    display: none;
}

/* Smart section form inputs should be smaller */
.smart-section .form-input {
    padding: 0.5rem 0.7rem;
    font-size: 0.8rem;
    font-weight: 500;
}

.age-selector {
    display: flex;
    gap: 0.4rem;
}

.age-btn {
    flex: 1;
    padding: 0.5rem 0.7rem;
    border: 1px solid var(--sleep-light);
    background: var(--sleep-white);
    color: var(--sleep-text);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.age-btn:hover {
    border-color: var(--sleep-secondary);
    background: rgba(139, 92, 246, 0.05);
}

.age-btn.active {
    background: var(--sleep-primary);
    color: var(--sleep-white);
    border-color: var(--sleep-primary);
}

.form-checkbox {
    width: 16px;
    height: 16px;
    accent-color: var(--sleep-secondary);
    margin-right: 0.5rem;
}

.form-help {
    font-size: 0.7rem;
    color: #4A5568;
    font-style: italic;
    margin-top: 0.3rem;
    display: block;
}

.analyze-btn {
    width: 100%;
    padding: 0.7rem 1rem;
    background: linear-gradient(135deg, var(--sleep-secondary) 0%, var(--sleep-primary) 100%);
    color: var(--sleep-white);
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 1.5rem;
}

.analyze-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.smart-results {
    border-top: 1px solid var(--sleep-light);
    padding: 1.5rem;
    background: var(--sleep-bg);
    border-radius: 4px;
    border: 1px solid var(--sleep-light);
    margin-top: 1rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.smart-header {
    margin-bottom: 1rem;
    text-align: center;
}

.smart-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--sleep-primary);
    margin: 0;
}

.result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.result-item {
    background: var(--sleep-white);
    padding: 0.8rem;
    border-radius: 4px;
    border: 1px solid var(--sleep-light);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.8rem;
    padding: 0.5rem 0;
}

.result-label {
    font-size: 0.8rem;
    color: #4A5568;
    font-weight: 500;
}

.result-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--sleep-primary);
    margin-top: 0.2rem;
}

/* Warning styles */
.warning-message {
    grid-column: 1 / -1;
    background: #FEF3E2;
    border: 1px solid #F59E0B;
    border-radius: 4px;
    padding: 1rem;
    margin-top: 1rem;
}

.suggestion-times {
    margin-top: 0.8rem;
}

.suggestion-item {
    background: var(--sleep-white);
    border: 1px solid var(--sleep-light);
    border-radius: 4px;
    padding: 0.5rem;
    margin-bottom: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--sleep-primary);
}

.result-value {
    font-size: 0.85rem;
    color: var(--sleep-primary);
    font-weight: 700;
}

/* Wake-up Time Suggestions */
.wake-suggestions {
    margin-top: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid var(--sleep-light);
    border-radius: 4px;
}

.wake-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--sleep-primary);
    margin: 0 0 0.8rem 0;
    text-align: center;
}

.wake-times {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: wrap;
}

.wake-time-option {
    background: var(--sleep-white);
    padding: 0.6rem 1rem;
    border-radius: 4px;
    border: 1px solid var(--sleep-secondary);
    font-size: 0.8rem;
    color: var(--sleep-text);
    text-align: center;
    min-width: 120px;
}

.wake-time-option strong {
    color: var(--sleep-secondary);
    font-weight: 700;
    display: block;
    margin-bottom: 0.2rem;
}


.section-title {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--sleep-primary);
    margin-bottom: 2rem;
}

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

.education-card {
    background: var(--sleep-white);
    border-radius: 4px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(11, 61, 145, 0.1);
    border-left: 4px solid var(--sleep-secondary);
}

.education-heading {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--sleep-primary);
    margin-bottom: 1rem;
}

.education-text {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--sleep-text);
    margin-bottom: 1.5rem;
}

.education-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.education-list li {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--sleep-text);
    margin-bottom: 0.8rem;
    padding-left: 1.2rem;
    position: relative;
    list-style: none;
}

.education-list li:before {
    content: "→";
    color: var(--sleep-secondary);
    font-weight: 700;
    position: absolute;
    left: 0;
}

/* Sleep Guide Section Styles */
.sleep-guide-section {
    padding: 2rem 0rem 0rem 0rem;
    background: linear-gradient(135deg, var(--sleep-bg) 0%, #ffffff 100%);
}

.guide-content {
    max-width: 1000px;
    margin: 0 auto;
}

.guide-header {
    text-align: center;
    margin-bottom: 3rem;
}

.guide-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--sleep-primary);
    margin: 0 0 1rem 0;
}

.guide-intro {
    font-size: 1.1rem;
    color: #4A5568;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

.guide-section {
    margin-bottom: 3rem;
    background: var(--sleep-white);
    padding: 2rem;
    border-radius: 4px;
    box-shadow: 0 2px 12px rgba(11, 61, 145, 0.1);
}

.section-heading {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--sleep-primary);
    margin: 0 0 1rem 0;
}

.section-text {
    font-size: 1rem;
    color: var(--sleep-text);
    line-height: 1.6;
    margin: 0 0 2rem 0;
}

.feature-list {
    display: grid;
    gap: 1.5rem;
}

.feature-item {
    padding: 1.5rem;
    background: ##f0efffad;;
    border-radius: 4px;
}

.feature-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--sleep-primary);
    margin: 0 0 0.5rem 0;
}

.feature-desc {
    font-size: 0.9rem;
    color: #2D3748;
    line-height: 1.5;
    margin: 0;
}

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

.duration-card {
    background: linear-gradient(135deg, var(--sleep-secondary) 0%, var(--sleep-accent) 100%);
    color: var(--sleep-white);
    padding: 1.5rem;
    border-radius: 4px;
    text-align: center;
}

.duration-age {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.duration-time {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.duration-note {
    font-size: 0.8rem;
    opacity: 0.9;
    line-height: 1.4;
}


.strategy-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.strategy-column {
    background: var(--sleep-light);
    padding: 1.5rem;
    border-radius: 4px;
}

.strategy-category {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--sleep-primary);
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--sleep-secondary);
}

.strategy-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.strategy-list li {
    font-size: 0.9rem;
    color: var(--sleep-text);
    line-height: 1.5;
    margin-bottom: 0.8rem;
    padding-left: 1.2rem;
    position: relative;
}

.strategy-list li:before {
    content: "✓";
    color: var(--sleep-secondary);
    font-weight: 700;
    position: absolute;
    left: 0;
}

.pro-tips {
    display: grid;
    gap: 1rem;
}

.tip-highlight {
    background: linear-gradient(135deg, var(--sleep-success) 0%, #059669 100%);
    color: var(--sleep-white);
    padding: 1.5rem;
    border-radius: 4px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.tip-highlight strong {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

/* Clickable Time Input Styles */
.clickable-time-input {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--sleep-white);
    border: 1px solid var(--sleep-light);
    border-radius: 4px;
    padding: 0.7rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px;
}

.clickable-time-input:hover {
    border-color: var(--sleep-secondary);
    box-shadow: 0 0 0 2px rgba(168, 144, 254, 0.1);
}

.clickable-time-input:focus-within {
    border-color: var(--sleep-primary);
    box-shadow: 0 0 0 2px rgba(11, 61, 145, 0.1);
}

.time-display {
    font-size: 1rem;
    font-weight: 600;
    color: var(--sleep-primary);
}

.time-input-icon {
    color: #4A5568;
    transition: color 0.2s ease;
}

.clickable-time-input:hover .time-input-icon {
    color: var(--sleep-secondary);
}

/* Time Popup Modal */
.time-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.time-popup-overlay.active {
    display: flex;
}

.time-popup-modal {
    background: var(--sleep-white);
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.time-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--sleep-light);
}

.time-popup-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--sleep-primary);
}

.time-popup-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #4A5568;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.time-popup-close:hover {
    color: var(--sleep-primary);
}

.time-popup-content {
    padding: 1.5rem;
}

.time-picker-wheels {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.time-wheel-container {
    text-align: center;
}

.wheel-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #4A5568;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.time-wheel {
    background: var(--sleep-bg);
    border: 1px solid var(--sleep-light);
    border-radius: 4px;
    max-height: 160px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--sleep-light) transparent;
}

.time-wheel::-webkit-scrollbar {
    width: 4px;
}

.time-wheel::-webkit-scrollbar-track {
    background: transparent;
}

.time-wheel::-webkit-scrollbar-thumb {
    background: var(--sleep-light);
    border-radius: 2px;
}

.time-wheel .time-option {
    padding: 0.6rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--sleep-text);
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid transparent;
}

.time-wheel .time-option:hover {
    background: rgba(168, 144, 254, 0.1);
}

.time-wheel .time-option.selected {
    background: linear-gradient(135deg, var(--sleep-primary) 0%, var(--sleep-secondary) 100%);
    color: var(--sleep-white);
}

.time-popup-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.time-btn {
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.time-btn.cancel {
    background: var(--sleep-bg);
    color: #4A5568;
    border: 1px solid var(--sleep-light);
}

.time-btn.cancel:hover {
    background: var(--sleep-light);
    color: var(--sleep-text);
}

.time-btn.confirm {
    background: linear-gradient(135deg, var(--sleep-primary) 0%, var(--sleep-secondary) 100%);
    color: var(--sleep-white);
}

.time-btn.confirm:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(11, 61, 145, 0.3);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Mobile Responsive for Guide Section */
@media (max-width: 768px) {
    .guide-title {
        font-size: 1.5rem;
    }
    
    .guide-intro {
        font-size: 1rem;
    }
    
    .guide-section {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .section-heading {
        font-size: 1.1rem;
    }
    
    .duration-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
    
    .strategy-columns {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .time-popup-modal {
        width: 95%;
        margin: 1rem;
    }
    
    .time-picker-wheels {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .time-wheel {
        max-height: 120px;
    }
    
    .time-popup-actions {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .time-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .sleep-guide-section {
    }
    
    .guide-content {
        padding: 0 1rem;
    }
    
    .guide-section {
        padding: 1rem;
    }
    
    .duration-time {
        font-size: 1.2rem;
    }
}

/* Inner Pages Styling - Match Home Theme */
.section-title {
    color: var(--sleep-primary);
    font-size: 1rem;
    font-weight: 600;
    margin: 1.5rem 0 0.8rem 0;
}

.simple-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.simple-list li {
    padding: 0.5rem 0;
    border-left: 3px solid var(--sleep-secondary);
    padding-left: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--sleep-text);
}

.feature-item {
    background: var(--sleep-light);
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 0.8rem;
    border-left: 4px solid var(--sleep-secondary);
}

.feature-item strong {
    color: var(--sleep-primary);
    font-size: 0.9rem;
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.feature-item p {
    font-size: 1rem;
    color: #4A5568;
    margin: 0;
    line-height: 1.5;
}

.contact-method {
    background: var(--sleep-light);
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 0.8rem;
    border-left: 4px solid var(--sleep-secondary);
}

.contact-method strong {
    color: var(--sleep-primary);
    font-size: 0.9rem;
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.contact-method p {
    font-size: 1rem;
    color: #4A5568;
    margin: 0;
    line-height: 1.5;
}

.form-textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--sleep-border);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--sleep-white);
    transition: all 0.2s ease;
    color: var(--sleep-primary);
    resize: vertical;
    min-height: 100px;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--sleep-secondary);
    box-shadow: 0 0 0 2px rgba(168,144,254,0.1);
}

.success-message {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid #28a745;
    color: #155724;
    padding: 0.8rem;
    border-radius: 4px;
    margin-top: 1rem;
    text-align: center;
    font-weight: 500;
}

.error-message {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid #dc3545;
    color: #721c24;
    padding: 0.8rem;
    border-radius: 4px;
    margin-top: 1rem;
    text-align: center;
    font-weight: 500;
}

.privacy-section,
.dmca-section {
    margin-bottom: 2rem;
}

.privacy-content p,
.dmca-content p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--sleep-text);
    margin-bottom: 1rem;
}

.content-section {
    margin-bottom: 2rem;
}

.content-section p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--sleep-text);
    margin-bottom: 1rem;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .calculator-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .visual-card,
    .smart-card {
        padding: 1rem;
        height: auto; /* Reset equal height on mobile */
    }
    
    .time-input-container {
        padding: 1rem;
    }
    
    .time-input-row {
        flex-wrap: wrap;
        gap: 0.3rem;
    }
    
    .time-select {
        padding: 0.5rem 0.6rem;
        font-size: 0.85rem;
        min-width: 50px;
    }
    
    .meridiem-select {
        min-width: 60px;
    }
    
    .time-unit {
        flex: 1;
        min-width: 0; /* Allow shrinking on small screens */
    }
    
    .time-label {
        font-size: 0.6rem;
        margin-bottom: 0.4rem;
    }
    
    .card-title {
        font-size: 0.9rem;
    }
    
    .card-subtitle {
        font-size: 0.75rem;
    }
    
    .age-selector {
        flex-direction: column;
    }
    
    .age-btn {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .sleep-calculator-section {
        padding: 1rem 0;
    }
    
    .visual-card,
    .smart-card {
        padding: 0.8rem;
    }
    
    .badge-time {
        font-size: 1.5rem;
    }
    
    .time-input-container {
        padding: 0.8rem;
    }
    
    .time-input-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .time-select {
        padding: 0.7rem 0.8rem;
        font-size: 0.9rem;
        min-width: 100%;
        max-width: 100%;
    }
    
    .meridiem-select {
        min-width: 100%;
    }
    
    .time-separator {
        display: none;
    }
}

/* Clean Time Input Form */
.time-input-container {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 4px;
    border: 1px solid var(--sleep-light);
}

.time-input-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.time-select {
    padding: 0.6rem 0.8rem;
    border: 2px solid var(--sleep-light);
    border-radius: 4px;
    background: var(--sleep-white);
    color: var(--sleep-text);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 60px;
}

.time-select:focus {
    outline: none;
    border-color: var(--sleep-secondary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.meridiem-select {
    min-width: 70px;
}

.time-separator {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--sleep-primary);
    margin: 0 0.2rem;
}

.time-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.time-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--sleep-primary);
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.time-scroll {
    width: 75px;
    height: 220px;
    background: var(--sleep-white);
    border: 2px solid var(--sleep-light);
    border-radius: 4px;
    overflow-y: auto;
    scroll-behavior: smooth;
    position: relative;
    box-shadow: 
        inset 0 2px 8px rgba(30, 58, 138, 0.1),
        0 2px 4px rgba(0, 0, 0, 0.05);
    
    /* Hide scrollbar but keep functionality */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.time-scroll::-webkit-scrollbar {
    display: none;
}

/* Selection indicator */
.time-scroll::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--sleep-secondary);
    transform: translateY(-1px);
    z-index: 2;
    pointer-events: none;
}

.time-scroll::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 40px;
    background: rgba(139, 92, 246, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 4px;
    transform: translateY(-20px);
    z-index: 1;
    pointer-events: none;
}

.time-option {
    padding: 0.9rem 0.8rem;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--sleep-text);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
}

.time-option:hover {
    background: rgba(139, 92, 246, 0.1);
    color: var(--sleep-secondary);
    transform: scale(1.05);
}

.time-option.active {
    background: linear-gradient(135deg, var(--sleep-secondary) 0%, var(--sleep-primary) 100%);
    color: var(--sleep-white);
    font-weight: 700;
    font-size: 0.9rem;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
    border-radius: 4px;
}
    border-radius: 8px;
    margin: 2px;
}

.select-option:hover {
    background: rgba(139, 92, 246, 0.1);
    color: var(--sleep-secondary);
    transform: scale(1.05);
}

.select-option.selected {
    background: linear-gradient(135deg, var(--sleep-secondary) 0%, var(--sleep-accent) 100%);
    color: var(--sleep-white);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
    z-index: 10;
}

/* Buttons */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, var(--sleep-secondary) 0%, var(--sleep-accent) 100%);
    color: var(--sleep-white);
    border: none;
    padding: 1.25rem 2.5rem;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 24px rgba(139, 92, 246, 0.3);
    min-width: 220px;
}

.button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.5);
    background: linear-gradient(135deg, #7c3aed 0%, var(--sleep-secondary) 100%);
}

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

.button_mb {
    margin-bottom: 2rem;
}

.button__text {
    font-size: 1.1rem;
    font-weight: 600;
}

.button__icon {
    width: 22px;
    height: 18px;
    fill: currentColor;
    stroke: currentColor;
}

.button__icon_sun {
    width: 19px;
    height: 20px;
}

/* Results Section */
.sleep-results-section {
    padding: 4rem 0;
    background: var(--sleep-white);
    border-top: 1px solid var(--sleep-light);
}

.results-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--sleep-text);
    text-align: center;
    margin: 0 0 2rem 0;
}

.sleep-recommendations {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.recommendation-card {
    background: linear-gradient(135deg, var(--sleep-white) 0%, var(--sleep-light) 100%);
    border: 2px solid var(--sleep-secondary);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(30, 58, 138, 0.1);
}

.recommendation-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(30, 58, 138, 0.2);
}

.recommendation-time {
    font-size: 2rem;
    font-weight: 700;
    color: var(--sleep-secondary);
    margin-bottom: 0.5rem;
}

.recommendation-cycles {
    font-size: 1rem;
    color: #4A5568;
    margin-bottom: 1rem;
}

.recommendation-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--sleep-text);
}

/* Sleep Tips Section */
.sleep-tips {
    margin-top: 3rem;
    text-align: center;
}

.sleep-tips h4 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--sleep-text);
    margin: 0 0 2rem 0;
}

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

.tip-card {
    background: var(--sleep-white);
    border: 1px solid var(--sleep-light);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: left;
    box-shadow: 0 2px 8px rgba(30, 58, 138, 0.1);
    transition: all 0.3s ease;
}

.tip-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(30, 58, 138, 0.15);
}

.tip-card h5 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--sleep-secondary);
    margin: 0 0 0.75rem 0;
}

.tip-card p {
    font-size: 1rem;
    color: #4A5568;
    line-height: 1.5;
    margin: 0;
}

/* Sleep Info Section */
.sleep-info-section {
    padding: 4rem 0;
    background: var(--sleep-bg);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.info-card {
    background: var(--sleep-white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 16px rgba(30, 58, 138, 0.1);
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(30, 58, 138, 0.2);
}

.info-card h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--sleep-text);
    margin: 0 0 1rem 0;
}

.info-card p {
    font-size: 1rem;
    color: #4A5568;
    line-height: 1.6;
    margin: 0;
}

.info-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-card li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--sleep-light);
    color: #4A5568;
}

.info-card li:last-child {
    border-bottom: none;
}

.info-card strong {
    color: var(--sleep-text);
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .content__large-text {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .time-picker {
        gap: 1rem;
        margin: 2rem 0 3rem 0;
    }
    
    .time-picker__hours,
    .time-picker__minutes,
    .time-picker__meridiem {
        width: 60px;
        height: 160px;
    }
    
    .select-option {
        height: 32px;
        line-height: 32px;
        font-size: 1rem;
    }
    
    .button {
        padding: 1rem 2rem;
        font-size: 1rem;
        min-width: 180px;
    }
    
    .results-title {
        font-size: 1.5rem;
    }
    
    .recommendation-time {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .content__section {
        padding: 2rem 0;
    }
    
    .time-picker {
        flex-direction: row !important; /* Force row layout on all screen sizes */
        gap: 0.5rem;
        justify-content: space-between;
        padding: 0.8rem 0.5rem;
    }
    
    .time-unit {
        flex: 1;
        min-width: 0; /* Allow shrinking */
    }
    
    .time-scroll {
        width: 50px !important; /* Smaller width for very small screens */
        height: 100px !important;
    }
    
    .time-label {
        font-size: 0.55rem;
        margin-bottom: 0.3rem;
    }
    
    .time-option {
        font-size: 0.75rem;
        padding: 0.2rem 0;
    }
    
    .time-picker__hours,
    .time-picker__minutes,
    .time-picker__meridiem {
        width: 50px;
        height: 100px;
    }
    
    .select-option {
        height: 28px;
        line-height: 28px;
        font-size: 0.9rem;
    }
}

/* Extra small screen support - Force row layout on all mobile devices */
@media (max-width: 360px) {
    .time-picker {
        flex-direction: row !important; /* Force row even on very small screens */
        gap: 0.2rem;
        padding: 0.6rem 0.3rem;
        justify-content: space-between;
    }
    
    .time-unit {
        flex: 1;
        min-width: 0;
    }
    
    .time-scroll {
        width: 40px !important;
        height: 80px !important;
    }
    
    .time-label {
        font-size: 0.45rem;
        margin-bottom: 0.2rem;
    }
    
    .time-option {
        font-size: 0.65rem;
        padding: 0.1rem 0;
    }
}