/* ============================================
   在线闹钟工具专用样式文件
   ⚠️ 不要在此文件中定义 info-card 样式！
   info-card 样式统一使用 tools-common.css
   ============================================ */

/* 当前时间显示区域 */
.current-time-section {
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 2rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.current-time {
    font-size: 4rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
    font-family: 'Courier New', monospace;
}

.current-date {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* 闹钟设置表单 */
.alarm-setting-section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #333;
}

.alarm-form {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #555;
}

.form-input,
.form-select {
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #667eea;
}

.repeat-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.9rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* 闹钟列表 */
.alarm-list-section {
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.alarm-controls {
    display: flex;
    gap: 0.5rem;
}

.alarm-list {
    margin-top: 1rem;
}

.alarm-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.alarm-item.enabled {
    border-color: #667eea;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.1);
}

.alarm-item.disabled {
    opacity: 0.6;
    background: #f8f9fa;
}

.alarm-info {
    flex: 1;
}

.alarm-time {
    font-size: 2rem;
    font-weight: 600;
    color: #667eea;
    font-family: 'Courier New', monospace;
}

.alarm-label {
    font-size: 1.1rem;
    color: #333;
    margin: 0.25rem 0;
}

.alarm-repeat {
    font-size: 0.9rem;
    color: #6b7280;
}

.alarm-item .alarm-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* 开关按钮 */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #667eea;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.btn-icon {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.btn-icon:hover {
    background: #e5e7eb;
}

/* 空状态 */
.empty-alarms {
    text-align: center;
    padding: 3rem;
    color: #6b7280;
    background: white;
    border-radius: 12px;
    border: 2px dashed #e5e7eb;
}

/* 快速设置 */
.quick-setting-section {
    margin-bottom: 2rem;
}

.quick-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.quick-btn {
    background: white;
    border: 2px solid #e5e7eb;
    padding: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.quick-btn:hover {
    border-color: #667eea;
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* 定时器 */
.timer-section {
    margin-bottom: 2rem;
}

.timer-container {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.timer-display {
    margin-bottom: 2rem;
}

.timer-time {
    font-size: 3rem;
    font-weight: 300;
    color: #667eea;
    font-family: 'Courier New', monospace;
    margin-bottom: 0.5rem;
}

.timer-status {
    font-size: 1.1rem;
    color: #6b7280;
}

.timer-controls {
    margin-top: 1.5rem;
}

.timer-inputs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.timer-input {
    width: 60px;
    padding: 0.5rem;
    text-align: center;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 1.1rem;
}

.timer-input:focus {
    outline: none;
    border-color: #667eea;
}

.timer-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* 统计信息 */
.statistics-section {
    margin-bottom: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.stat-item {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: #6b7280;
}

/* 闹钟弹窗 */
.alarm-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;
    z-index: 1000;
}

.alarm-modal-content {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.alarm-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: ring 1s infinite;
}

@keyframes ring {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

.alarm-modal h2 {
    color: #667eea;
    margin-bottom: 1rem;
}

.alarm-modal p {
    margin: 0.5rem 0;
    color: #6b7280;
}

.alarm-modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

/* 按钮样式 */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-outline {
    background: white;
    border: 2px solid #e5e7eb;
    color: #333;
}

.btn-outline:hover {
    border-color: #667eea;
    color: #667eea;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .current-time {
        font-size: 2.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .repeat-options {
        justify-content: center;
    }

    .alarm-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .alarm-item .alarm-controls {
        width: 100%;
        justify-content: space-between;
    }

    .timer-time {
        font-size: 2rem;
    }

    .timer-buttons {
        flex-direction: column;
        align-items: center;
    }

    .alarm-modal-actions {
        flex-direction: column;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }
}
