/* ===== FORM STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    min-height: 100vh;
    padding: 20px;
}

.form-container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* ===== HEADER ===== */
.form-header {
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
    color: white;
    padding: 2rem;
    text-align: center;
}

.form-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 300;
}

.form-header p {
    opacity: 0.9;
    font-size: 1.1rem;
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
    display: flex;
    background: #f8f9fa;
    padding: 1rem 2rem;
}

.progress-step {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    position: relative;
    font-weight: 500;
}

.progress-step.active {
    color: var(--primary);
    font-weight: 600;
}

.progress-step::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.progress-step.active::after {
    width: 80%;
}

/* ===== FORM SECTIONS ===== */
.form-section {
    padding: 2rem;
    display: none;
}

.form-section.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--dark);
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 0.5rem;
}

/* ===== COLOR SELECTION ===== */
.color-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.color-option {
    aspect-ratio: 1;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.color-option:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.color-option.selected {
    border-color: var(--dark);
    transform: scale(1.05);
}

.color-option::after {
    content: '✓';
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 255, 255, 0.9);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.color-option.selected::after {
    opacity: 1;
}

.selected-palette {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
    min-height: 80px;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 12px;
    align-items: center;
}

.selected-color {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    position: relative;
    cursor: move;
}

.selected-color .remove-color {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    font-size: 12px;
}

/* ===== EMOTIONAL ASSIGNMENT ===== */
.color-meaning-section {
    margin-bottom: 2rem;
}

.color-with-meaning {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 12px;
}

.color-display {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    flex-shrink: 0;
}

.meaning-controls {
    flex: 1;
}

.meaning-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.meaning-tag {
    background: var(--primary);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.meaning-tag .remove-tag {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1rem;
}

.tag-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag-option {
    background: #ecf0f1;
    border: 1px solid #bdc3c7;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tag-option:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ===== PRIORITY SECTION ===== */
.priority-instructions {
    background: #e8f4fc;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary);
}

.priority-list {
    min-height: 200px;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.priority-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    cursor: move;
}

.priority-handle {
    cursor: grab;
    color: #7f8c8d;
    font-size: 1.2rem;
}

.priority-color {
    width: 40px;
    height: 40px;
    border-radius: 6px;
}

/* ===== RESULTS SECTION ===== */
.palette-preview {
    display: flex;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    margin: 2rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.palette-color {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1rem;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.export-options {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.export-btn {
    flex: 1;
    min-width: 150px;
    padding: 1rem;
    border: 2px solid var(--primary);
    background: white;
    color: var(--primary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.export-btn:hover {
    background: var(--primary);
    color: white;
}

/* ===== FORM CONTROLS ===== */
.form-controls {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

.btn {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-prev {
    background: #95a5a6;
    color: white;
}

.btn-next {
    background: var(--primary);
    color: white;
}

.btn-prev:hover {
    background: #7f8c8d;
}

.btn-next:hover {
    background: #2980b9;
}

.btn-submit {
    background: #27ae60;
    color: white;
}

.btn-submit:hover {
    background: #219a52;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .form-container {
        margin: 10px;
    }
    
    .color-selection-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    }
    
    .form-controls {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
    }
    
    .color-with-meaning {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .export-options {
        flex-direction: column;
    }
}