/* 配色方案生成器样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
}

header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

header p {
    font-size: 1.1rem;
    color: #7f8c8d;
}

.input-section {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.color-input {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.color-input label {
    font-weight: 600;
    font-size: 1.1rem;
}

#base-color {
    width: 80px;
    height: 40px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.rule-selection label {
    display: block;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.rules {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.rule-btn {
    padding: 10px 20px;
    background-color: #ecf0f1;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.rule-btn:hover {
    background-color: #d5dbdb;
}

.rule-btn.active {
    background-color: #3498db;
    color: white;
}

.preview-section {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.preview-section h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #2c3e50;
}

.color-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.color-card {
    flex: 1;
    min-width: 150px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.color-card:hover {
    transform: translateY(-5px);
}

.color-display {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
}

.color-info {
    padding: 15px;
    background: white;
    text-align: center;
}

.color-info .hex {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.color-info .format {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.copy-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #2ecc71;
    color: white;
    padding: 15px 25px;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transform: translateX(200%);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.copy-notification.show {
    transform: translateX(0);
}

.saved-schemes {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.saved-schemes h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #2c3e50;
}

.saved-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.saved-palette {
    display: flex;
    width: 100%;
    max-width: 300px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.saved-color {
    flex: 1;
    height: 50px;
}

.saved-actions {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: #f8f9fa;
}

.saved-actions button {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.apply-btn {
    background: #3498db;
    color: white;
}

.delete-btn {
    background: #e74c3c;
    color: white;
}

.save-btn {
    padding: 12px 25px;
    background: #2ecc71;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: background 0.3s ease;
}

.save-btn:hover {
    background: #27ae60;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .input-section, .preview-section, .saved-schemes {
        padding: 20px;
    }
    
    .color-input {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .rules {
        justify-content: center;
    }
    
    .color-card {
        min-width: 120px;
    }
    
    .color-display {
        height: 100px;
    }
    
    .saved-palette {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .rule-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .color-card {
        min-width: 100%;
    }
}