:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --accent-color: #4895ef;
    --dark-color: #1b263b;
    --light-color: #f8f9fa;
    --success-color: #4cc9f0;
    --danger-color: #f72585;
    --warning-color: #f8961e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--dark-color);
    color: var(--light-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 20px;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(90deg, var(--accent-color), var(--success-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.subtitle {
    color: var(--accent-color);
    opacity: 0.8;
    font-size: 1rem;
}

.tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 0.8rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50px;
    color: var(--light-color);
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Clock Styles */
.clock-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 2rem;
}

.time-display {
    font-size: 5rem;
    font-weight: 300;
    text-align: center;
    margin-bottom: 1rem;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
}

.date-display {
    font-size: 1.5rem;
    text-align: center;
    opacity: 0.8;
    margin-bottom: 2rem;
}

.world-clock-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.world-clock {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.world-clock .city {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.world-clock .time {
    font-size: 2rem;
    font-family: 'Courier New', monospace;
}

.world-clock .date {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-top: 0.5rem;
}

/* Alarm Styles */
.alarm-form {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.alarm-form input, .alarm-form select {
    padding: 0.8rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
}

.alarm-form button {
    padding: 0.8rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.alarm-form button:hover {
    background: var(--secondary-color);
}

.alarms-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.alarm-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.alarm-item.active {
    border-left: 5px solid var(--success-color);
}

.alarm-time {
    font-size: 1.5rem;
    font-weight: bold;
}

.alarm-actions {
    display: flex;
    gap: 1rem;
}

.alarm-actions button {
    background: none;
    border: none;
    color: var(--light-color);
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.alarm-actions button:hover {
    opacity: 1;
}

.alarm-actions .delete-btn {
    color: var(--danger-color);
}

.alarm-actions .toggle-btn.active {
    color: var(--success-color);
}

/* Stopwatch Styles */
.stopwatch-display {
    font-size: 4rem;
    text-align: center;
    margin: 2rem 0;
    font-family: 'Courier New', monospace;
}

.stopwatch-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.stopwatch-btn {
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stopwatch-btn.start {
    background: var(--success-color);
    color: white;
}

.stopwatch-btn.stop {
    background: var(--danger-color);
    color: white;
}

.stopwatch-btn.reset {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.stopwatch-btn.lap {
    background: var(--accent-color);
    color: white;
}

.stopwatch-laps {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 1rem;
}

.lap-item {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.lap-item:first-child {
    font-weight: bold;
    color: var(--success-color);
}

/* Timer Styles */
.timer-display {
    font-size: 5rem;
    text-align: center;
    margin: 2rem 0;
    font-family: 'Courier New', monospace;
}

.timer-input {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.timer-input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timer-input-group label {
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.timer-input-group input {
    width: 80px;
    padding: 0.8rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.2rem;
    text-align: center;
}

.timer-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.timer-btn {
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.timer-btn.start {
    background: var(--success-color);
    color: white;
}

.timer-btn.pause {
    background: var(--warning-color);
    color: white;
}

.timer-btn.reset {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Settings Styles */
.settings-form {
    max-width: 500px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
}

.settings-btn {
    padding: 0.8rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    width: 100%;
}

.settings-btn:hover {
    background: var(--secondary-color);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .time-display {
        font-size: 3rem;
    }
    
    .stopwatch-display, .timer-display {
        font-size: 3rem;
    }
    
    .alarm-form {
        flex-direction: column;
        align-items: center;
    }
    
    .alarm-item {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .alarm-actions {
        width: 100%;
        justify-content: center;
    }
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transform: translateX(200%);
    transition: transform 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.notification.show {
    transform: translateX(0);
}

.notification .close-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1rem;
}