/**
 * Art Learning App - Complete CSS Stylesheet
 * File: assets/style.css
 * Version: 1.0.0
 */

/* ==========================================
   1. RESET & BASE STYLES
   ========================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.art-app-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background: linear-gradient(135deg, #4CAF50 0%, #009688 100%);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ==========================================
   2. TAB NAVIGATION
   ========================================== */
.art-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    background: white;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.tab-btn {
    padding: 12px 24px;
    border: none;
    background: #e9ecef;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 14px;
    color: #495057;
    flex: 1;
    min-width: 120px;
}

.tab-btn:hover {
    background: #dee2e6;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.tab-btn.active {
    background: linear-gradient(40deg, #FFC107 0%, #FF5722 100%);
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* ==========================================
   3. TAB CONTENT
   ========================================== */
.tab-content {
    display: none;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

.tab-content h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 28px;
    border-bottom: 3px solid #FF9800;
    padding-bottom: 10px;
    display: inline-block;
}

.tab-content h3 {
    color: #34495e;
    margin: 20px 0 15px;
    font-size: 20px;
}

.tab-content h4 {
    color: #495057;
    margin: 15px 0 10px;
    font-size: 16px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   4. COLOR MIXING LAB
   ========================================== */
.color-system-selector {
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.color-system-selector label {
    font-weight: 600;
    color: #495057;
}

.color-system-selector select {
    padding: 8px 15px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.color-system-selector select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.color-mixer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 25px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.primary-colors {
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.color-input {
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.color-input label {
    font-weight: 600;
    color: #495057;
    min-width: 100px;
}

.color-input input[type="color"] {
    width: 60px;
    height: 45px;
    border: 3px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.color-input input[type="color"]:hover {
    border-color: #667eea;
    transform: scale(1.05);
}

.color-input input[type="range"] {
    flex: 1;
    min-width: 150px;
    height: 8px;
    border-radius: 5px;
    background: #dee2e6;
    outline: none;
    -webkit-appearance: none;
}

.color-input input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    transition: all 0.3s;
}

.color-input input[type="range"]::-webkit-slider-thumb:hover {
    background: #764ba2;
    transform: scale(1.2);
}

.color-input input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
}

.color-input span {
    font-weight: 600;
    color: #667eea;
    min-width: 45px;
}

.result-color {
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.color-preview {
    width: 100%;
    height: 220px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    margin: 15px 0;
    transition: transform 0.3s;
}

.color-preview:hover {
    transform: scale(1.02);
}

.color-codes {
    text-align: left;
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.color-codes p {
    margin: 8px 0;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #495057;
}

.color-codes strong {
    color: #667eea;
    min-width: 60px;
    display: inline-block;
}

/* ==========================================
   5. PRACTICE EXERCISES
   ========================================== */
.practice-exercises,
.drawing-exercises {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.exercise-btn,
.draw-exercise {
    padding: 12px 24px;
    margin: 8px;
    border: none;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.2);
}

.exercise-btn:hover,
.draw-exercise:hover {
    background: linear-gradient(135deg, #218838 0%, #1aa179 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(40, 167, 69, 0.3);
}

.exercise-btn:active,
.draw-exercise:active {
    transform: translateY(-1px);
}

/* Exercise Panel */
.exercise-panel {
    margin-top: 25px;
    padding: 25px;
    background: linear-gradient(135deg, #fff5e6 0%, #ffe6cc 100%);
    border-radius: 12px;
    border-left: 5px solid #ff9800;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.2);
}

.exercise-panel h3 {
    color: #e65100;
    margin-bottom: 15px;
}

.target-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.color-box {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.color-sample {
    width: 100%;
    height: 150px;
    border-radius: 8px;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    padding: 12px 30px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    margin-top: 15px;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0056b3 0%, #003d82 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 123, 255, 0.4);
}

/* Result Box */
.result-box {
    margin-top: 20px;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    animation: slideUp 0.5s ease;
}

.result-box.score-good {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 2px solid #28a745;
}

.result-box.score-try-again {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid #ffc107;
}

.result-box h2 {
    font-size: 36px;
    margin-bottom: 15px;
    color: #2c3e50;
}

.result-box p {
    font-size: 18px;
    color: #495057;
    margin: 10px 0;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.accuracy-bar {
    width: 100%;
    height: 30px;
    background: #e9ecef;
    border-radius: 15px;
    overflow: hidden;
    margin-top: 15px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.accuracy-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
    transition: width 1s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    color: white;
    font-weight: bold;
}

/* ==========================================
   6. DRAWING PRACTICE
   ========================================== */
.drawing-tools,
.combined-tools {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.drawing-tools label,
.combined-tools label {
    font-weight: 600;
    color: #495057;
}

.drawing-tools select,
.combined-tools select {
    padding: 8px 15px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.drawing-tools select:focus,
.combined-tools select:focus {
    outline: none;
    border-color: #667eea;
}

.drawing-tools button,
.combined-tools button {
    padding: 10px 20px;
    border: none;
    background: #FF9800;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.drawing-tools button:hover,
.combined-tools button:hover {
    background: #FF9800;
    transform: translateY(-2px);
	color:#fff !important;
}

.combined-tools button.active {
    background: linear-gradient(27deg, #FF5722 0%, #FF9800 100%);
}

.combined-tools input[type="color"] {
    width: 50px;
    height: 40px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
}

.combined-tools input[type="range"] {
    width: 150px;
}

#drawing-canvas,
#combined-canvas,
#svg-drawing-container svg,
#svg-combined-container svg {
    border: 3px solid #dee2e6;
    border-radius: 10px;
    cursor: crosshair;
    display: block;
    margin: 20px auto;
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* ==========================================
   7. FEEDBACK BOX
   ========================================== */
.feedback-box {
    margin-top: 25px;
    padding: 25px;
    background: linear-gradient(135deg, #e7f3ff 0%, #cfe9ff 100%);
    border-left: 5px solid #007bff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.2);
}

.feedback-box h4 {
    color: #0056b3;
    margin-bottom: 15px;
    font-size: 18px;
}

.feedback-box p {
    color: #495057;
    font-size: 16px;
    line-height: 1.6;
    margin: 10px 0;
}

.feedback-box .score {
    margin-top: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    color: #667eea;
}

/* ==========================================
   8. COLOR PALETTE
   ========================================== */
.color-palette {
    margin-top: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

#suggested-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.color-swatch {
    width: 55px;
    height: 55px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.color-swatch:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

/* ==========================================
   9. PROGRESS TRACKING
   ========================================== */
.user-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(356deg, #FF9800 0%, #FFEB3B 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.stat-card h3 {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    opacity: 0.9;
}

.big-text {
    font-size: 3em;
    font-weight: bold;
    margin: 15px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

/* ==========================================
   10. ACHIEVEMENTS & BADGES
   ========================================== */
.achievements {
    margin: 30px 0;
    padding: 25px;
    background: linear-gradient(135deg, #fff9e6 0%, #ffe6b3 100%);
    border-radius: 12px;
}

#badges-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.badge {
    padding: 15px 25px;
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    border-radius: 50px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge:hover {
    transform: translateY(-3px) rotate(2deg);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.5);
}

.badge.locked {
    background: #e9ecef;
    color: #6c757d;
    opacity: 0.6;
    box-shadow: none;
}

.badge-icon {
    font-size: 24px;
}

.badge-name {
    font-size: 14px;
}

/* ==========================================
   11. PROGRESS CHART
   ========================================== */
.progress-chart {
    margin: 30px 0;
    padding: 25px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

#progress-canvas {
    display: block;
    margin: 20px auto;
    max-width: 100%;
}

.progress-chart-bars {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: 300px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-top: 20px;
}

.chart-bar {
    flex: 1;
    max-width: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.bar-fill {
    width: 100%;
    background: linear-gradient(to top, #667eea, #764ba2);
    border-radius: 8px 8px 0 0;
    transition: all 0.5s ease;
    box-shadow: 0 -4px 10px rgba(102, 126, 234, 0.3);
}

.bar-label {
    font-size: 12px;
    font-weight: 600;
    color: #495057;
    margin-top: 10px;
}

.bar-value {
    font-size: 16px;
    font-weight: bold;
    color: #667eea;
}

/* ==========================================
   12. RECENT ARTWORKS
   ========================================== */
.recent-works {
    margin: 30px 0;
    padding: 25px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

#recent-artworks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.artwork-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.artwork-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.artwork-info p {
    margin: 8px 0;
    color: #495057;
    font-size: 14px;
}

.artwork-info strong {
    color: #667eea;
    font-weight: 600;
}

/* ==========================================
   13. NOTIFICATIONS
   ========================================== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
    z-index: 9999;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.4s ease;
    font-weight: 600;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

/* ==========================================
   14. RESPONSIVE DESIGN
   ========================================== */
@media (max-width: 768px) {
    .art-app-container {
        padding: 15px;
        margin: 10px;
    }

    .art-tabs {
        flex-direction: column;
    }

    .tab-btn {
        width: 100%;
    }

    .tab-content {
        padding: 20px;
    }

    .tab-content h2 {
        font-size: 22px;
    }

    .color-mixer {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .target-comparison {
        grid-template-columns: 1fr;
    }

    .user-stats {
        grid-template-columns: 1fr;
    }

    .big-text {
        font-size: 2em;
    }

    #drawing-canvas,
    #combined-canvas,
    #svg-drawing-container svg,
    #svg-combined-container svg {
        width: 100%;
        max-width: 100%;
    }

    .drawing-tools,
    .combined-tools {
        flex-direction: column;
        align-items: stretch;
    }

    .drawing-tools button,
    .combined-tools button,
    .drawing-tools select,
    .combined-tools select {
        width: 100%;
    }

    #badges-container {
        flex-direction: column;
    }

    .badge {
        width: 100%;
        justify-content: center;
    }

    #recent-artworks {
        grid-template-columns: 1fr;
    }

    .progress-chart-bars {
        height: 250px;
    }

    .notification {
        right: 10px;
        left: 10px;
        top: 10px;
    }
}

@media (max-width: 480px) {
    .tab-content h2 {
        font-size: 18px;
    }

    .color-input {
        flex-direction: column;
        align-items: flex-start;
    }

    .color-input label {
        width: 100%;
    }

    .color-input input[type="range"] {
        width: 100%;
    }

    .exercise-btn,
    .draw-exercise {
        width: 100%;
        margin: 5px 0;
    }

    .big-text {
        font-size: 1.8em;
    }

    .result-box h2 {
        font-size: 28px;
    }
}

/* ==========================================
   15. UTILITY CLASSES
   ========================================== */
.text-center {
    text-align: center;
}

.mt-10 {
    margin-top: 10px;
}

.mt-20 {
    margin-top: 20px;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

.p-15 {
    padding: 15px;
}

.p-20 {
    padding: 20px;
}

/* ==========================================
   16. ANIMATIONS
   ========================================== */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

.bounce {
    animation: bounce 1s infinite;
}

/* ==========================================
   17. PRINT STYLES
   ========================================== */
@media print {
    .art-tabs,
    .drawing-tools,
    .combined-tools,
    .exercise-btn,
    .draw-exercise,
    .btn-primary,
    .notification {
        display: none;
    }

    .art-app-container {
        box-shadow: none;
        background: white;
    }

    .tab-content {
        display: block !important;
        page-break-after: always;
    }
}