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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
}

.container {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 90%;
    text-align: center;
}

h1 {
    color: #4a5568;
    margin-bottom: 30px;
    font-size: 2.5em;
    font-weight: 300;
}

h2 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 1.3em;
    font-weight: 500;
}

.time-setting {
    margin-bottom: 30px;
    padding: 20px;
    background: #f7fafc;
    border-radius: 15px;
}

.time-inputs {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

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

.input-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #4a5568;
    font-size: 0.9em;
}

.input-group input {
    width: 70px;
    height: 50px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    text-align: center;
    font-size: 1.2em;
    font-weight: 600;
    color: #2d3748;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

#display {
    font-size: 4em;
    font-weight: 300;
    color: #2d3748;
    font-family: 'Courier New', monospace;
    background: #f7fafc;
    padding: 30px;
    border-radius: 20px;
    border: 3px solid #e2e8f0;
    transition: all 0.3s ease;
}

#display.running {
    border-color: #48bb78;
    background: #f0fff4;
    color: #22543d;
}

#display.finished {
    border-color: #f56565;
    background: #fff5f5;
    color: #c53030;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

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

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

.btn.start {
    background: #48bb78;
    color: white;
}

.btn.start:hover:not(:disabled) {
    background: #38a169;
}

.btn.pause {
    background: #ed8936;
    color: white;
}

.btn.pause:hover:not(:disabled) {
    background: #dd6b20;
}

.btn.reset {
    background: #e53e3e;
    color: white;
}

.btn.reset:hover:not(:disabled) {
    background: #c53030;
}

.btn.test {
    background: #805ad5;
    color: white;
}

.btn.test:hover:not(:disabled) {
    background: #6b46c1;
}

.btn.ring {
    background: #3182ce;
    color: white;
}

.btn.ring:hover:not(:disabled) {
    background: #2c5282;
}

.bell-setting {
    margin-bottom: 30px;
    padding: 20px;
    background: #f7fafc;
    border-radius: 15px;
}

.bell-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.bell-times-container {
    width: 100%;
    margin-bottom: 15px;
}

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

.bell-times-header label {
    font-weight: 600;
    color: #4a5568;
    font-size: 0.9em;
}

.bell-times-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bell-time-item {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.bell-time-input {
    width: 120px;
    height: 35px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    text-align: center;
    font-size: 1em;
    font-weight: 600;
    color: #2d3748;
    transition: all 0.3s ease;
}

.bell-time-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-small {
    padding: 6px 12px;
    border: none;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 50px;
}

.btn-small.add {
    background: #48bb78;
    color: white;
}

.btn-small.add:hover {
    background: #38a169;
    transform: translateY(-1px);
}

.btn-small.remove {
    background: #e53e3e;
    color: white;
}

.btn-small.remove:hover {
    background: #c53030;
    transform: translateY(-1px);
}

.bell-controls .input-group {
    flex-direction: row;
    gap: 10px;
    align-items: center;
}

.bell-controls .input-group input {
    width: 60px;
    height: 40px;
}

.status {
    padding: 15px;
    background: #edf2f7;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

#statusMessage {
    color: #4a5568;
    font-weight: 500;
}

/* レスポンシブデザイン */
@media (max-width: 600px) {
    .container {
        padding: 20px;
        margin: 20px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    #display {
        font-size: 2.5em;
        padding: 20px;
    }
    
    .time-inputs {
        gap: 10px;
    }
    
    .controls {
        gap: 10px;
    }
    
    .btn {
        min-width: 80px;
        padding: 10px 16px;
        font-size: 0.9em;
    }
}
