/* coloring.css - Kemirik Evreni Etkileşimli Boyama Sayfası Stilleri */

body {
    font-family: 'roboto', sans-serif;
    background-image:
        radial-gradient(#ffc078 1.2px, transparent 1.2px),
        radial-gradient(#ffd8a8 1.2px, rgba(255, 243, 222, 0.94) 1.2px);
        background-size: 40px 40px;
    background-position: 0 0, 20px 20px;
}

a {
    text-decoration: none;
}

.top-section {
    display: flex;
    justify-content: flex-start;
}

.coloring-section {
    padding: 20px 15px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.coloring-header {
    text-align: center;
    margin-bottom: 25px;
}

.coloring-header h1 {
    font-family: 'Archivo Black', sans-serif;
    color: #333;
    font-size: 2.2rem;
    margin-bottom: 8px;
}

/* Galeri Modu (Resim Seçim Ekranı) */
.gallery-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.coloring-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border: 3px solid transparent;
    display: flex;
    flex-direction: column;
    border-color: #FFA500;
}

.coloring-card:hover {
    box-shadow: 0 12px 32px rgba(255, 165, 0, 0.25);
}

.coloring-card-img-wrapper {
    width: 100%;
    height: 220px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 10px;
}

.coloring-card-img-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.coloring-card-info {
    padding: 15px;
    text-align: center;
    background: #fff;
    border-top: 1px solid #eee;
}

.coloring-card-info h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #333;
    font-weight: 700;
}

/* Studio / Canvas Modu */
.studio-container {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.studio-container.active {
    display: flex;
}

.studio-top-bar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.back-btn {
    background: #ff6600;
    color: #333;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.back-btn:hover {
    background: #faa268;
}

.active-title {
    font-family: 'Archivo Black', sans-serif;
    font-size: 1.5rem;
    color: #FFA500;
    margin: 0;
}

/* Canvas Çalışma Alanı */
.workspace-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 15px;
}

.canvas-card-wrapper {
    background: #ffffff;
    padding: 15px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    border: 4px solid #FFA500;
    max-width: 100%;
    touch-action: none;
    /* Mobilde tuvale dokunurken sayfanın kaymasını önler */
    display: flex;
    justify-content: center;
    align-items: center;
}

#coloringCanvas {
    background: #ffffff;
    border-radius: 12px;
    cursor: crosshair;
    display: block;
    max-width: 100%;
    height: auto;
}

/* Araç Paneli (Toolbar) */
.toolbar-container {
    background: #ffffff;
    border-radius: 20px;
    padding: 15px 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: 100%;
    max-width: 850px;
    border: 2px solid #ffe0b2;
}

.tool-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tool-btn {
    background: #f8f9fa;
    border: 2px solid #5d5d5d;
    color: #495057;
    padding: 10px 16px;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.tool-btn:hover {
    background: #fff3e0;
    border-color: #FFA500;
    color: #e65100;
}

.tool-btn.active {
    background: #FFA500;
    color: #ffffff;
    border-color: #ff8f00;
    box-shadow: 0 4px 12px rgba(255, 165, 0, 0.4);
}

.action-btn {
    background: #f8f9fa;
    border: 2px solid #5d5d5d;
    color: #333;
    padding: 10px 16px;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: #e9ecef;
}

.action-btn.download-btn {
    background: #2e7d32;
    color: #fff;
    border-color: #1b5e20;
}

.action-btn.download-btn:hover {
    background: #1b5e20;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}

.action-btn.clear-btn {
    background: #d32f2f;
    color: #fff;
    border-color: #b71c1c;
}

.action-btn.clear-btn:hover {
    background: #b71c1c;
}

/* Renk Paleti */
.palette-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 10px;
    background: #fafafa;
    border-radius: 16px;
}

.color-swatch {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 3px solid #ffffff;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: inline-block;
}

.color-swatch:hover {
    transform: scale(1.18);
}

.color-swatch.active {
    transform: scale(1.25);
    border-color: #333;
    box-shadow: 0 0 0 3px #FFA500, 0 4px 12px rgba(0, 0, 0, 0.3);
}

.custom-color-picker {
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    background: none;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #777;
    grid-column: 1 / -1;
}

.empty-state i {
    font-size: 3rem;
    color: #FFA500;
    margin-bottom: 15px;
}

/* Responsive Düzen */
@media (max-width: 768px) {
    .coloring-header h1 {
        font-size: 1.7rem;
    }

    .toolbar-container {
        padding: 12px;
        gap: 10px;
    }

    .tool-btn,
    .action-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .color-swatch {
        width: 32px;
        height: 32px;
    }
}