/* One Stroke Puzzle Tool - Main Stylesheet */

/* Body and Global Styles */
body {
    font-family: Arial, sans-serif;
    background: #f7f7f7;
    margin: 0;
    padding: 0;
}

/* Layout Containers */
.container-flex {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 32px;
    margin: 40px auto;
    max-width: 950px;
}

.filter-panel {
    background: #f8f9fa;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 18px 18px 12px 18px;
    min-width: 160px;
    max-width: 180px;
    margin-top: 0;
    margin-bottom: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.filter-panel h3 {
    margin-top: 0;
    font-size: 1.1em;
    color: #1976d2;
    margin-bottom: 12px;
}

.container {
    max-width: 600px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    padding: 32px 24px 24px 24px;
    flex: 1 1 0%;
}

/* Typography */
h1 {
    text-align: center;
    color: #333;
}

/* Canvas Styles */
#puzzle-canvas {
    display: block;
    margin: 30px auto 10px auto;
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 6px;
}

/* Info and Feedback Elements */
.info {
    text-align: center;
    color: #666;
    margin-bottom: 16px;
}

/* Puzzle Library Scroll Area */
.puzzle-scroll {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-x: visible;
    overflow-y: auto;
    padding-bottom: 10px;
    margin-bottom: 8px;
    margin-top: 2px;
    max-height: 220px;
}

.puzzle-row {
    display: flex;
    flex-direction: row;
    gap: 16px;
    justify-content: flex-start;
    align-items: center;
}

/* Puzzle Thumbnails */
.puzzle-thumb {
    min-width: 90px;
    min-height: 90px;
    width: 90px;
    height: 90px;
    background: #f0f0f0;
    border: 2px solid #bbb;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border 0.2s;
    position: relative;
}

.puzzle-thumb.selected {
    border: 2.5px solid #1976d2;
    box-shadow: 0 0 0 2px #90caf9;
}

.puzzle-thumb-title {
    position: absolute;
    bottom: 3px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.75em;
    color: #444;
    background: rgba(255,255,255,0.8);
    border-radius: 0 0 7px 7px;
}

/* Generator Badge */
.generator-badge {
    position: absolute;
    top: 3px;
    right: 3px;
    font-size: 0.65em;
    padding: 2px 5px;
    background-color: rgba(25, 118, 210, 0.8);
    color: white;
    border-radius: 3px;
    font-weight: bold;
    z-index: 2;
    text-transform: capitalize;
}

/* Buttons */
.one-stroke-btn {
    background-color: #2196f3;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.one-stroke-btn:hover {
    background-color: #1976d2;
}

/* Congratulation Animation */
@keyframes congratsAppear {
    0% { opacity: 0; transform: translateY(-10px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes congratsFade {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

/* Congratulation Message */
#congrats-message {
    position: relative;
    text-align: center;
    margin-top: -15px;
    margin-bottom: 15px;
    font-size: 1.2em;
    font-weight: bold;
    color: #43a047;
    padding: 8px;
    border-radius: 4px;
    animation: congratsAppear 0.5s ease-in-out;
}

/* Notification Area */
#generator-notification {
    margin: 10px 0;
    padding: 10px 15px;
    border-radius: 4px;
    display: none;
}
