/* Color Harmony Checker Styles */

.harmony-input-section {
    margin: 2rem 0;
}

.input-card {
    background: var(--background-secondary);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.input-card h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.input-card > p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.color-inputs {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.color-input-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.color-picker {
    width: 60px;
    height: 60px;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    background: transparent;
    padding: 0;
}

.color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: var(--radius);
}

.color-picker::-webkit-color-swatch {
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
}

.color-picker::-moz-color-swatch {
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
}

.color-text {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: 'Monaco', 'Consolas', monospace;
    background: var(--background);
    color: var(--text-primary);
    transition: border-color 0.2s;
}

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

.color-text.error {
    border-color: #ef4444;
}

.btn-random,
.btn-remove {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 1.25rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-random {
    background: var(--background-secondary);
    color: var(--text-primary);
}

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

.btn-remove {
    background: #fee2e2;
    color: #ef4444;
}

.btn-remove:hover {
    background: #ef4444;
    color: white;
}

.input-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

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

/* Harmony Rules Section */
.harmony-rules-section {
    margin: 2rem 0;
}

.harmony-rules-section h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.rule-card {
    background: var(--background-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.rule-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.rule-card input[type="checkbox"] {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.rule-card input[type="checkbox"]:checked ~ .rule-icon {
    background: var(--primary-color);
    color: white;
}

.rule-icon {
    width: 60px;
    height: 60px;
    background: var(--background-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1rem;
    transition: all 0.3s;
}

.rule-card h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.rule-card p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Results Section */
.harmony-results-section {
    margin: 2rem 0;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.harmony-results-section h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.overall-score {
    display: flex;
    align-items: center;
    gap: 2rem;
    background: var(--background-secondary);
    padding: 2rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
}

.score-circle {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.circular-chart {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.circle-bg {
    fill: none;
    stroke: var(--border-color);
    stroke-width: 2.5;
}

.circle {
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    transition: stroke-dasharray 1s ease;
}

.percentage {
    fill: var(--text-primary);
    font-size: 8px;
    font-weight: bold;
    text-anchor: middle;
    transform: rotate(90deg);
    transform-origin: center;
}

.score-info h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.score-info p {
    margin: 0;
    color: var(--text-secondary);
}

.rules-results {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.rule-result {
    background: var(--background-secondary);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.rule-result-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.rule-result-icon.success {
    background: #dcfce7;
    color: #10b981;
}

.rule-result-icon.warning {
    background: #fef3c7;
    color: #f59e0b;
}

.rule-result-icon.error {
    background: #fee2e2;
    color: #ef4444;
}

.rule-result-content {
    flex: 1;
}

.rule-result-content h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.rule-result-content p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.rule-result-score {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* Color Preview */
.color-preview {
    background: var(--background-secondary);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.color-preview h4 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.preview-swatches {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.swatch {
    width: 80px;
    height: 80px;
    border-radius: var(--radius);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 0.5rem;
    font-size: 0.75rem;
    font-family: 'Monaco', 'Consolas', monospace;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    font-weight: 500;
}

/* Suggestions */
.suggestions {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
    border: 2px solid var(--primary-color);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.suggestions h4 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.suggestions ul {
    margin: 0;
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

.suggestions li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Guide Section */
.guide-section {
    margin: 3rem 0;
    padding: 2rem;
    background: var(--background-secondary);
    border-radius: var(--radius);
}

.guide-section h3 {
    margin: 0 0 1.5rem 0;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.guide-content h4 {
    margin: 1.5rem 0 0.75rem 0;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.guide-content h4:first-child {
    margin-top: 0;
}

.guide-content p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Responsive */
@media (max-width: 768px) {
    .color-input-row {
        flex-wrap: wrap;
    }
    
    .color-picker {
        width: 50px;
        height: 50px;
    }
    
    .color-text {
        flex: 1;
        min-width: calc(100% - 120px);
    }
    
    .input-actions {
        flex-direction: column;
    }
    
    .input-actions .btn {
        width: 100%;
    }
    
    .rules-grid {
        grid-template-columns: 1fr;
    }
    
    .overall-score {
        flex-direction: column;
        text-align: center;
    }
    
    .rule-result {
        flex-direction: column;
        text-align: center;
    }
    
    .preview-swatches {
        justify-content: center;
    }
    
    .swatch {
        width: 70px;
        height: 70px;
    }
}
