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

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

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

/* Navigation */
.navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 15px 25px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-left, .nav-right {
    flex: 1;
}

.nav-center {
    flex: 1;
    text-align: center;
}

.nav-brand {
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
    font-weight: 500;
    display: inline-block;
}

.nav-home {
    background: rgba(255, 255, 255, 0.1);
}

.nav-home:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-3px);
}

.nav-main-site {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    animation: pulse-nav 2s infinite;
}

.nav-main-site:hover {
    background: linear-gradient(135deg, #ff5252 0%, #d84315 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.nav-right {
    text-align: right;
}

@keyframes pulse-nav {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 107, 107, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 107, 107, 0.5);
    }
}

@media (max-width: 768px) {
    .navigation {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .nav-left, .nav-center, .nav-right {
        flex: none;
    }
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.9;
}

/* Main layout */
.main-content {
    display: grid;
    gap: 30px;
}

/* Status section */
.status-section {
    display: flex;
    justify-content: center;
}

.status-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
    min-width: 300px;
}

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

.status-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
    animation: pulse 2s infinite;
}

.status-dot.away {
    background: #ef4444;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
}

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

.status-time {
    font-size: 1.1rem;
    color: #666;
}

/* Stats section */
.stats-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

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

.stat-card {
    text-align: center;
    padding: 20px;
    background: #f8fafc;
    border-radius: 15px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

/* Control buttons */
.controls-section {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
}

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

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #5a67d8;
    transform: translateY(-2px);
}

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

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

.btn-danger {
    background: #ef4444;
    color: white;
}

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

.btn-info {
    background: #06b6d4;
    color: white;
}

.btn-info:hover:not(:disabled) {
    background: #0891b2;
    transform: translateY(-2px);
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
    min-width: auto;
}

/* Settings */
.settings-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

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

.setting-item {
    display: flex;
    align-items: center;
}

.setting-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    gap: 10px;
}

.setting-checkbox {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
}

.setting-checkbox:checked + .checkmark {
    background: #667eea;
    border-color: #667eea;
}

.setting-checkbox:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* History section */
.history-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.history-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.history-list {
    max-height: 300px;
    overflow-y: auto;
}

.history-empty {
    text-align: center;
    color: #666;
    padding: 40px;
    font-style: italic;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #e5e7eb;
    transition: background 0.3s ease;
}

.history-item:hover {
    background: #f9fafb;
}

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

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

.history-duration {
    color: #666;
    font-size: 0.9rem;
}

/* Alert modal */
.alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.alert-overlay.show {
    display: flex;
}

.alert-modal {
    background: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    animation: alertSlideIn 0.3s ease;
}

.alert-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.alert-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #ef4444;
}

.alert-message {
    color: #666;
    margin-bottom: 30px;
    line-height: 1.5;
}

/* Animations */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes alertSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Responsive layout */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .controls-section {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
}
