﻿
.tracing-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
}

/* Magical Dropdown Selector */
.select-wrapper {
    position: relative;
    width: 100%;
}

    .select-wrapper select {
        font-family: 'Fredoka', sans-serif;
        padding: 12px 20px;
        font-size: 1.2rem;
        font-weight: 600;
        border: 3px solid #67e8f9;
        border-radius: 20px;
        background-color: #ecfeff;
        color: #0e7490;
        cursor: pointer;
        outline: none;
        width: 100%;
        appearance: none;
        text-align: center;
        box-shadow: 0 4px 0px #22d3ee;
        transition: transform 0.1s;
    }

        .select-wrapper select:active {
            transform: translateY(2px);
            box-shadow: 0 2px 0px #22d3ee;
        }

.wbtncss.active {
    background: radial-gradient(circle at 30% 30%, #ffedd5 0%, #f97316 100%);
    color: white;
    box-shadow: 0 4px 0px #c2410c;
    transform: scale(1.1) translateY(-2px);
}

.wbtncss:hover:not(.active) {
    transform: scale(1.05);
}

/* Canvas Wrapper */
.tablet-frame {
    position: relative;
    background: #ffffff;
    border-radius: 24px;
    border: 5px solid #f472b6;
    overflow: hidden;
    background-image: radial-gradient(#fbcfe8 1px, transparent 1px);
    background-size: 20px 20px;
    min-width: 340px;
}

#tracingCanvas {
    display: block;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10" fill="%23f472b6" opacity="0.5"/></svg>') 12 12, crosshair;
    touch-action: none;
    max-width: 100%;
    height: auto;
}

/* Container Spacing & Alignment */
.action-row {
    gap: 0.75rem;
    padding: 0.5rem 0;
}

/* Base Action Button Styles */
.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.4rem;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: inherit;
    border-radius: 50px; /* Fully rounded pill shape */
    border: 2px solid #333;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

    /* Push-down Effect on Click */
    .action-btn:active:not(:disabled) {
        transform: translateY(2px);
        box-shadow: 0 2px 3px -1px rgba(0, 0, 0, 0.1);
    }

    /* --- BUTTON VARIANTS --- */

    /* Prev Button (Soft Blue/Indigo Accent) */
    /* Prev Button (Warning / Amber Accent) */
    .action-btn.go-back {
        background-color: #fffbebfb; /* Warm light amber background */
        color: #b45309; /* Dark warning amber text */
        border-color: #fde68a; /* Subtle amber border */
    }

        /* Hover State */
        .action-btn.go-back:hover:not(:disabled) {
            background-color: #fef3c7; /* Slightly deeper amber fill */
            border-color: #fcd34d; /* Vibrant border accent */
            color: #92400e; /* Strong amber text focus */
            transform: translateY(-2px);
            box-shadow: 0 6px 12px -2px rgba(245, 158, 11, 0.25);
        }

        /* Click / Active State */
        .action-btn.go-back:active:not(:disabled) {
            transform: translateY(1px);
            box-shadow: 0 2px 4px -1px rgba(245, 158, 11, 0.15);
        }

        /* Disabled State (Handled by JS when reaching start of range) */
        .action-btn.go-back:disabled {
            background-color: #f3f4f6 !important;
            color: #9ca3af !important;
            border-color: #e5e7eb !important;
            cursor: not-allowed;
            opacity: 0.6;
            box-shadow: none !important;
            transform: none !important;
        }

    /* Clear Button (Soft Rose / Red) */
    .action-btn.clean-up {
        background-color: #ffffff;
        color: #e11d48;
        border-color: #fecdd3;
    }

        .action-btn.clean-up:hover:not(:disabled) {
            background-color: #fff1f2;
            border-color: #fda4af;
            color: #be123c;
            transform: translateY(-2px);
        }

    /* Next Button (Solid Vibrant Emerald / Green) */
    .action-btn.go-forward {
        background-color: #10b981;
        color: #ffffff;
        border-color: #059669;
    }

        .action-btn.go-forward:hover:not(:disabled) {
            background-color: #059669;
            border-color: #047857;
            transform: translateY(-2px);
            box-shadow: 0 6px 12px -2px rgba(16, 185, 129, 0.3);
        }

    /* --- DISABLED STATE (HANDLED AUTOMATICALLY BY SCRIPT) --- */
    .action-btn:disabled {
        background-color: #f3f4f6 !important;
        color: #9ca3af !important;
        border-color: #e5e7eb !important;
        cursor: not-allowed;
        opacity: 0.65;
        box-shadow: none !important;
        transform: none !important;
    }