/* PuzzleSolver themed styles */

.upload-section {
    background: linear-gradient(90deg, #e3f0ff 0%, #f5f5f5 100%);
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(40, 167, 69, 0.08);
    max-width: 600px;
    margin: 40px auto;
    padding: 32px 24px 24px 24px;
    font-family: 'Segoe UI', 'Montserrat', Arial, sans-serif;
}

/* Fullscreen modifier for upload prompt */
.fullscreen-upload {
    /* leave room for a left sidebar; default sidebar width is 260px */
    --sidebar-width: 260px;
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    width: calc(100vw - var(--sidebar-width));
    height: 100vh;
    max-width: none;
    margin: 0;
    border-radius: 0;
    display: flex;
    flex-direction: column; /* stack header above upload box */
    align-items: center;    /* center horizontally */
    justify-content: flex-start; /* align to top */
    padding: 80px 24px 24px 24px; /* spacing from top */
    gap: 20px;
    z-index: 1040;
}

.upload-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 8px;
}

.upload-logo {
    height: 120px;
    margin-bottom: 10px;
}

.fancy-font {
    font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
    font-size: 2.2rem;
    color: #28a745;
    font-weight: 700;
    letter-spacing: 1px;
}

.subtitle {
    color: #333;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.benefits {
    margin-top: 12px;
    text-align: left;
    max-width: 760px;
}
.benefits-title {
    font-size: 1rem;
    color: #19692a;
    margin: 6px 0;
    font-weight: 700;
}
.benefits-list {
    list-style: disc;
    padding-left: 18px;
    color: #333;
}
.benefits-list li {
    margin-bottom: 6px;
    line-height: 1.35;
}

.drag-drop-zone {
    border: 2.5px dashed #28a745;
    background: #fff;
    border-radius: 16px;
    min-height: 260px;
    width: 720px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    margin-bottom: 18px;
    position: relative;
}
.drag-drop-zone.drag-active {
    border-color: #007bff;
    background: #e3f0ff;
}
.upload-cloud {
    width: 72px;
    margin-bottom: 12px;
}

/* make upload box visually smaller when placed beside header */
.fullscreen-upload .drag-drop-zone {
    min-height: 320px;
    width: 720px;
    border-radius: 14px;
}
.drag-text {
    font-size: 1.1rem;
    color: #28a745;
    font-weight: 500;
}
.selected-file {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    font-size: 1.1rem;
    color: #333;
}
.file-icon {
    width: 28px;
    margin-right: 8px;
}
.share-link-box {
    background: #fafafa;
    border-radius: 10px;
    padding: 12px 18px;
    margin-top: 18px;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.06);
    text-align: center;
}

@media (max-width: 600px) {
    .upload-section {
        padding: 16px 6px;
    }
    .fancy-font {
        font-size: 1.3rem;
    }
    .drag-drop-zone {
        min-height: 120px;
    }
    .fullscreen-upload {
        padding: 24px 12px 12px 12px;
        left: 0;
        width: 100vw;
    }

    .fullscreen-upload .drag-drop-zone {
        width: 100%;
        max-width: 420px;
        min-height: 220px;
    }
}

/* Fullscreen puzzle styles */
.puzzle-container.fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    z-index: 2000;
    background: #fff0; /* transparent */
    display: block;
}

.puzzle-container.fullscreen object {
    width: 100% !important;
    height: 100% !important;
}

/* Optional: ensure embedded SVG loading overlay appears above content */
#puzzleObject {
    z-index: 2100;
}

/* Host overlay timer (fixed top-left) */
#puzzle-timer {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 3000;
    background: rgba(255,255,255,0.85);
    color: #000;
    padding: 6px 10px;
    border-radius: 6px;
    font-family: Arial, sans-serif;
    font-size: 0.95rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    pointer-events: none; /* let interactions pass through */
}

/* Smaller on very small screens */
@media (max-width: 480px) {
    #puzzle-timer {
        font-size: 0.85rem;
        padding: 4px 8px;
    }
}

/* Download button shown on puzzle completion */
#puzzle-download {
    display: none;
    position: fixed;
    top: 8px;
    left: 90px;
    z-index: 3000;
    pointer-events: auto;
    background: #ffffff; /* white background for contrast */
    color: #0b3d91; /* brand blue text */
    border: 1px solid rgba(11,61,145,0.15);
    padding: 6px 12px;
    border-radius: 8px;
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    transition: transform 0.08s ease, box-shadow 0.12s ease;
}

#puzzle-download:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.16);
}

.puzzle-container.fullscreen + #puzzle-download,
#puzzle-download.visible {
    display: inline-block !important;
}
