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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    transition: background 0.5s ease;
}

/* Status-based background gradients for individual user pages */
body.status-available {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body.status-busy {
    background: linear-gradient(135deg, #ff6b6b 0%, #ffa500 100%);
}

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

header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

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


.nav-links {
    margin-top: 15px;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.nav-link:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

.status-card {
    background: #cac6c6;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 30px;
    text-align: center;
}

.status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.status-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.status-dot.available {
    background-color: #4CAF50;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

.status-dot.busy {
    background-color: #F44336;
    box-shadow: 0 0 10px rgba(244, 67, 54, 0.5);
    animation: pulse 1.5s infinite;
}

.status-dot.error {
    background-color: #FF9800;
    box-shadow: 0 0 10px rgba(255, 152, 0, 0.5);
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.status-text {
    font-size: 1.5rem;
    font-weight: 600;
}

.timer-display {
    margin: 20px 0;
}

.time-remaining {
    font-size: 3rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    font-family: 'Courier New', monospace;
}

.session-info {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 20px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    border-radius: 4px;
    transition: width 1s ease;
    width: 0%;
}

.controls {
    background: #f5f5f5;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 20px;
}

.controls h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.preset-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.preset-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.preset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.custom-timer {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

#customMinutes {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    width: 120px;
    text-align: center;
}

#customMinutes:focus {
    outline: none;
    border-color: #667eea;
}

.custom-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.custom-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
}

.stop-btn {
    background: #F44336;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin: 0 auto;
}

.stop-btn:hover {
    background: #d32f2f;
    transform: translateY(-2px);
}

footer {
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    padding: 20px;
    color: white;
    text-align: center;
}

.api-info h4 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.api-info p {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    margin: 5px 0;
    opacity: 0.9;
}

/* Users List Styles */
.users-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.loading-message, .no-users-message, .error-message {
    background: #f5f5f5;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    text-align: center;
    color: #666;
    font-size: 1.1rem;
}

.error-message {
    color: #F44336;
    border-left: 4px solid #F44336;
}

.user-card {
    background: #f5f5f5;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.user-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.25);
    border-color: #667eea;
}

.user-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.user-info {
    flex-grow: 1;
}

.user-name {
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.user-username {
    font-size: 1rem;
    color: #666;
    font-family: 'Courier New', monospace;
}

.user-card .status-indicator {
    margin-bottom: 0;
    justify-content: flex-end;
}

.user-card .status-text {
    font-size: 1rem;
    font-weight: 500;
}

.user-card .status-dot {
    width: 16px;
    height: 16px;
}

.user-card .session-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 15px 0;
    font-size: 1rem;
    color: #495057;
    font-weight: 500;
    border-left: 4px solid #F44336;
}

.last-activity {
    font-size: 0.9rem;
    color: #888;
    margin-top: 10px;
}

/* Recent Sessions Styles */
.recent-sessions-card {
    background: #cac6c6;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 30px;
}

.recent-sessions-card h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.3rem;
    font-weight: 600;
}

.sessions-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.session-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.session-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.session-item.completed {
    border-left-color: #4CAF50;
}

.session-item.stopped {
    border-left-color: #F44336;
}

.session-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.session-status {
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.session-status.completed {
    background: #d4edda;
    color: #155724;
}

.session-status.stopped {
    background: #f8d7da;
    color: #721c24;
}

.session-duration {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.session-time {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 8px;
}

.session-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #888;
}

.no-sessions-message {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px 20px;
}

@media (max-width: 600px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .time-remaining {
        font-size: 2.5rem;
    }
    
    .preset-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .preset-btn {
        width: 200px;
    }
    
    .custom-timer {
        flex-direction: column;
    }
    
    #customMinutes {
        width: 200px;
    }
    
    .user-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .user-card .status-indicator {
        justify-content: flex-start;
    }
    
    .user-name {
        font-size: 1.2rem;
    }
    
    .user-username {
        font-size: 0.9rem;
    }
}

.home-link {
    text-align: center;
    margin-top: 40px;
    padding-bottom: 20px;
}

.home-link a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.9em;
}

.home-link a:hover {
    color: white;
}
