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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #1a1a2e;
    color: #eee;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#app {
    width: 100%;
    max-width: 500px;
    padding: 20px;
}

.hidden {
    display: none !important;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #16213e;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    width: 90%;
    max-width: 400px;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #fff;
}

.modal-content input {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 2px solid #0f3460;
    border-radius: 8px;
    background: #1a1a2e;
    color: #fff;
    margin-bottom: 15px;
    -webkit-text-security: disc;
}

.modal-content input:focus {
    outline: none;
    border-color: #e94560;
}

.modal-content button {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    background: #e94560;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.modal-content button:hover {
    background: #ff6b6b;
}

.error {
    color: #e94560;
    margin-top: 10px;
}

/* Timer Container */
#timer-container {
    text-align: center;
}

.sync-indicator {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    display: inline-block;
    margin-bottom: 30px;
    background: #0f3460;
}

.sync-indicator.connected {
    background: #1b4332;
}

.sync-indicator.syncing {
    background: #5c4033;
}

.sync-indicator.error {
    background: #5c1a1a;
}

/* Timer Display */
.timer {
    font-size: 72px;
    font-weight: 200;
    font-family: 'Courier New', monospace;
    letter-spacing: 4px;
    margin-bottom: 40px;
    padding: 20px;
    background: #16213e;
    border-radius: 12px;
}

.timer.negative {
    color: #e94560;
}

.timer.running {
    background: #1b4332;
}

/* Toggle Button */
.toggle-btn {
    padding: 16px 60px;
    font-size: 20px;
    font-weight: 600;
    background: #e94560;
    color: #fff;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 40px;
}

.toggle-btn:hover {
    transform: scale(1.05);
    background: #ff6b6b;
}

.toggle-btn.running {
    background: #ff6b6b;
}

/* Event Log */
#event-log {
    text-align: left;
    background: #16213e;
    padding: 20px;
    border-radius: 12px;
}

#event-log h3 {
    margin-bottom: 15px;
    color: #aaa;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#log-list {
    list-style: none;
    max-height: 200px;
    overflow-y: auto;
}

#log-list li {
    padding: 10px 0;
    border-bottom: 1px solid #0f3460;
    display: flex;
    justify-content: space-between;
}

#log-list li:last-child {
    border-bottom: none;
}

.event-type {
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 600;
}

.event-type.start {
    color: #52b788;
}

.event-type.stop {
    color: #e94560;
}

.event-time {
    color: #888;
    font-family: 'Courier New', monospace;
}
