/*
Theme Name: ColoringPro Premium
Theme URI: https://example.com/coloringpro
Author: Your Name
Description: Premium WordPress theme for coloring pages with interactive canvas.
Version: 1.0.0
Text Domain: coloringpro
*/

:root {
    --primary-color: #FF6B6B;
    --bg-light: #F8F9FA;
    --text-main: #2D3436;
    --card-shadow: 0 10px 20px rgba(0,0,0,0.05);
    --border-radius: 16px;
}

body {
    font-family: 'Nunito', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    margin: 0;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: #fff;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo h1 { margin: 0; font-size: 1.5rem; font-family: 'Quicksand', sans-serif; }
.site-logo a { text-decoration: none; color: inherit; font-weight: 700; }

.nav-list {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
}

.nav-list a {
    text-decoration: none;
    font-weight: 600;
    color: var(--text-main);
    transition: 0.3s;
}

.nav-list a:hover { color: var(--primary-color); }

/* Grid Layout */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    padding: 40px 0;
}

.card {
    background: #fff;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease;
}

.card:hover { transform: translateY(-8px); }

.card-image-wrapper {
    position: relative;
    padding-top: 100%;
    background: #eee;
}

.card-image-wrapper img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
}

.card-content { padding: 20px; text-align: center; }
.card-title { font-size: 1.1rem; margin: 0; font-family: 'Quicksand', sans-serif; }

/* Interactive Canvas */
.canvas-card {
    background: #fff;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--card-shadow);
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

#coloring-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 75%; /* 4:3 Aspect Ratio */
    background: #fff;
}

#backgroundImage {
    position: absolute;
    width: 100%; height: 100%;
    top: 0; left: 0;
    z-index: 1;
    pointer-events: none; /* User paints "under" lines */
}

#paintCanvas {
    position: absolute;
    width: 100%; height: 100%;
    top: 0; left: 0;
    z-index: 2;
    cursor: crosshair;
    mix-blend-mode: multiply; /* KUNCI PREMIUM: Warna tidak menimpa garis hitam */
}

/* Tools */
.tools-card {
    background: #fff;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--card-shadow);
    margin-bottom: 40px;
}

.palette-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 10px;
    margin-bottom: 25px;
}

.swatch {
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: 0.2s;
}

.swatch.active { transform: scale(1.15); box-shadow: 0 0 10px rgba(0,0,0,0.1); }

.toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.btn-tool {
    padding: 10px 20px;
    border: 2px solid #eee;
    background: #fff;
    border-radius: 30px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

.btn-tool.active { background: var(--primary-soft); border-color: var(--primary-color); }

.btn-main-action {
    padding: 15px 40px;
    border-radius: 40px;
    border: none;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* Footer */
.site-footer {
    background: #2D3436;
    color: #fff;
    padding: 60px 0 20px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr; }
    .header-container { flex-direction: column; gap: 15px; }
}