:root {
    --primary-color: #4CAF50;
    --secondary-color: #2196F3;
    --danger-color: #F44336;
    --bg-color: #F5F5F5;
    --text-color: #212121;
    --border-radius: 12px;
}

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

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

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

/* Ads */
.ad-container {
    min-height: 90px;
    margin-bottom: 20px;
    text-align: center;
}

.top-ad {
    margin-bottom: 20px;
}

.bottom-ad {
    margin-top: 20px;
}

/* Header */
.main-header {
    text-align: center;
    margin-bottom: 2rem;
}

.main-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
}

/* Tab Navigation */
.tab-nav {
    display: flex;
    gap: 0;
    margin-bottom: 2rem;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    border: none;
    background: white;
    color: #757575;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Noto Sans KR', sans-serif;
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
}

.tab-btn:hover:not(.active) {
    background: #F5F5F5;
}

/* Tool Sections */
.tool-section {
    display: none;
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tool-section.active {
    display: block;
}

/* Time Display */
.time-display {
    font-family: 'JetBrains Mono', monospace;
    font-size: 4rem;
    font-weight: 700;
    text-align: center;
    margin: 2rem 0;
    color: var(--text-color);
}

/* Controls */
.controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Noto Sans KR', sans-serif;
}

.btn-large {
    padding: 1.2rem 2.5rem;
    font-size: 1.1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

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

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

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

.btn-danger {
    background: var(--danger-color);
    color: white;
}

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

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

/* Timer Input */
.timer-input {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin: 2rem 0;
}

.input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.input-group label {
    font-size: 0.9rem;
    color: #757575;
    margin-bottom: 0.5rem;
}

.input-group input {
    width: 100px;
    padding: 1rem;
    font-size: 2rem;
    font-family: 'JetBrains Mono', monospace;
    text-align: center;
    border: 2px solid #E0E0E0;
    border-radius: var(--border-radius);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Laps */
.laps-container {
    margin-top: 2rem;
}

.laps-container h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #757575;
}

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

.lap-item {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem;
    border-bottom: 1px solid #E0E0E0;
    font-family: 'JetBrains Mono', monospace;
}

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

.lap-number {
    color: #757575;
}

.lap-time {
    font-weight: 700;
}

/* Share Button */
.btn-share-header {
    background: white;
    color: var(--text-color);
    border: 2px solid #E0E0E0;
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
    margin-top: 1rem;
}

.btn-share-header:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Info Section */
.info-section {
    background: white;
    padding: 2rem;
    margin: 2rem 0;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    line-height: 1.8;
}

.info-section h2 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.info-section h3 {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
}

.info-section p {
    color: var(--text-color);
    margin-bottom: 1rem;
}

.info-section ul {
    list-style: none;
    padding-left: 0;
}

.info-section ul li {
    padding: 0.5rem 0;
    color: var(--text-color);
}

.info-section ul li strong {
    color: var(--primary-color);
}

/* Toast */
.toast {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(76, 175, 80, 0.95);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 0.95rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: bottom 0.3s ease;
    z-index: 10000;
    white-space: nowrap;
}

.toast.show {
    bottom: 30px;
}

/* Footer */
.main-footer {
    text-align: center;
    margin-top: 3rem;
    padding: 1rem;
    color: #9E9E9E;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .time-display {
        font-size: 3rem;
    }

    .controls {
        flex-direction: column;
    }

    .btn-large {
        width: 100%;
    }

    .timer-input {
        gap: 1rem;
    }

    .input-group input {
        width: 80px;
        font-size: 1.5rem;
    }
}