* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #333;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 100%;
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
}

main {
    padding: 30px;
}

.tab-container {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.tab-button {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: #e0e0e0;
    color: #666;
    font-size: 16px;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.tab-button.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.input-section {
    background: #f5f5f5;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #555;
}

input[type="time"] {
    width: 100%;
    padding: 15px;
    font-size: 24px;
    border: 2px solid #ddd;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 20px;
    transition: border-color 0.3s ease;
}

input[type="time"]:focus {
    outline: none;
    border-color: #667eea;
}

.calculate-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.results {
    margin-top: 20px;
}

.result-item {
    background: #f8f9fa;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.3s ease;
}

.result-item:hover {
    transform: translateX(5px);
}

.result-time {
    font-size: 24px;
    font-weight: 600;
    color: #667eea;
}

.result-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.cycles {
    background: #667eea;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
}

.sleep-duration {
    color: #666;
    font-size: 14px;
}

.recommended {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.info-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #eee;
}

.info-section h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #444;
}

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

.info-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.info-card h3 {
    font-size: 1.2em;
    margin-bottom: 10px;
    color: #667eea;
}

.info-card p {
    color: #666;
    line-height: 1.6;
}

.current-time {
    text-align: center;
    margin-top: 30px;
    padding: 15px;
    background: #f0f0f0;
    border-radius: 10px;
}

.current-time p {
    font-size: 18px;
    color: #555;
}

#current-time {
    font-weight: 600;
    color: #667eea;
}

footer {
    background: #f8f9fa;
    padding: 20px;
    text-align: center;
    color: #666;
}

@media (max-width: 600px) {
    h1 {
        font-size: 2em;
    }
    
    .tab-button {
        font-size: 14px;
        padding: 10px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
}