
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* =========================
   VARIABLES
========================= */

:root {
    --bg: #101827;
    --surface: #1C2938;
    --surface-light: #263648;
    --mint: #69E6B0;
    --white: #F5F7FA;
    --muted: #A8B4C4;
    --border: #344456;
}

/* =========================
   RESET
========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--white);
    font-family: 'Inter', sans-serif;
}

/* =========================
   HEADER
========================= */

.header {
    width: 100%;
    padding: 25px 8%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--white);
    text-decoration: none;
    font-size: 22px;
    font-weight: 800;
}

.logo-icon {
    color: var(--mint);
    font-size: 35px;
    line-height: 1;
}

.header-label {
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
}

/* =========================
   MAIN
========================= */

.main {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 75px 25px;
    flex: 1;
}

/* =========================
   HERO
========================= */

.hero {
    text-align: center;
    margin-bottom: 55px;
}

.eyebrow {
    color: var(--mint);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
}

.hero h1 {
    margin-top: 22px;
    font-size: clamp(38px, 6vw, 62px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -2px;
}

.hero h1 span {
    color: var(--mint);
}

.hero-description {
    max-width: 520px;
    margin: 20px auto 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.8;
}

/* =========================
   UPLOAD BOX
========================= */

.upload-section {
    width: 100%;
    max-width: 750px;
    margin: 0 auto;
}

.upload-box {
    padding: 55px 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 2px dashed var(--border);
    border-radius: 18px;
    background: var(--surface);
    text-align: center;
    transition: 0.25s ease;
}

.upload-box:hover,
.upload-box.dragging {
    border-color: var(--mint);
    background: var(--surface-light);
}

.upload-icon {
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    background: rgba(105, 230, 176, 0.1);
    color: var(--mint);
    font-size: 30px;
    margin-bottom: 20px;
}

.upload-box h2 {
    font-size: 20px;
    font-weight: 700;
}

.upload-box p {
    margin-top: 10px;
    color: var(--muted);
    font-size: 13px;
}

.upload-button {
    margin-top: 25px;
    padding: 13px 27px;
    border-radius: 8px;
    background: var(--mint);
    color: var(--bg);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}

.upload-button:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.file-info {
    margin-top: 20px;
    color: var(--muted);
    font-size: 11px;
}

/* =========================
   UPLOAD STATUS
========================= */

.upload-status {
    margin-top: 18px;
    text-align: center;
    color: var(--mint);
    font-size: 13px;
    font-weight: 600;
}

/* =========================
   GALLERY
========================= */

.gallery-section {
    width: 100%;
    margin-top: 75px;
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.gallery-header h2 {
    margin-top: 10px;
    font-size: 25px;
}

.image-counter {
    color: var(--muted);
    font-size: 13px;
}

/* =========================
   GALLERY GRID
========================= */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

/* =========================
   IMAGE CARD
========================= */

.image-card {
    min-width: 0;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: var(--surface);
    transition: 0.2s ease;
}

.image-card:hover {
    border-color: var(--mint);
}

.gallery-image {
    display: block;
    width: 100%;
    height: 190px;
    object-fit: contain;
    border-radius: 10px;
    background: var(--bg);
}

/* =========================
   IMAGE DETAILS
========================= */

.image-details {
    margin-top: 15px;
}

.image-details h3 {
    overflow-wrap: anywhere;
    font-size: 14px;
    font-weight: 600;
}

.image-details p {
    margin-top: 7px;
    color: var(--muted);
    font-size: 11px;
}

.image-details .upload-success {
    color: var(--mint);
}

.image-details .upload-error {
    color: #FF8585;
}

/* =========================
   IMAGE LINK
========================= */

.gallery-link {
    display: flex;
    gap: 7px;
    margin-top: 15px;
}

.gallery-link input {
    min-width: 0;
    width: 100%;
    flex: 1;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 7px;
    outline: none;
    background: var(--bg);
    color: var(--white);
    font-size: 10px;
}

.gallery-link input:focus {
    border-color: var(--mint);
}

.gallery-link button {
    padding: 0 13px;
    border: none;
    border-radius: 7px;
    background: var(--mint);
    color: var(--bg);
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}

.gallery-link button:hover:not(:disabled) {
    opacity: 0.85;
}

.gallery-link button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* =========================
   REMOVE BUTTON
========================= */

.gallery-remove {
    width: 100%;
    margin-top: 10px;
    padding: 9px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: transparent;
    color: #FF8585;
    cursor: pointer;
    transition: 0.2s ease;
}

.gallery-remove:hover {
    background: rgba(255, 133, 133, 0.1);
    border-color: #FF8585;
}

/* =========================
   FOOTER
========================= */

.footer {
    width: 100%;
    padding: 25px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer p {
    color: var(--muted);
    font-size: 11px;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 600px) {

    .header {
        padding: 20px 5%;
    }

    .logo {
        font-size: 19px;
    }

    .logo-icon {
        font-size: 30px;
    }

    .header-label {
        font-size: 8px;
        letter-spacing: 1px;
    }

    .main {
        padding: 55px 18px;
    }

    .hero {
        margin-bottom: 40px;
    }

    .hero h1 {
        font-size: 38px;
        letter-spacing: -1.5px;
    }

    .hero-description {
        font-size: 13px;
    }

    .upload-box {
        padding: 40px 15px;
    }

    .upload-box h2 {
        font-size: 18px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-header h2 {
        font-size: 21px;
    }

    .gallery-image {
        height: 220px;
    }
}

.gallery-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.gallery-actions button {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    background: var(--mint);
    color: var(--bg);
    font-weight: 700;
    cursor: pointer;
}

.gallery-actions button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

#copy-all-status {
    color: var(--mint);
    font-size: 12px;
}

.gallery-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.gallery-actions select {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--white);
    font-size: 12px;
    outline: none;
    cursor: pointer;
}

.gallery-actions select:focus {
    border-color: var(--mint);
}

.gallery-actions button {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    background: var(--mint);
    color: var(--bg);
    font-weight: 700;
    cursor: pointer;
}

.gallery-actions button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

#copy-all-status {
    color: var(--mint);
    font-size: 12px;
}

@media (max-width: 600px) {
    .gallery-actions {
        align-items: stretch;
    }

    .gallery-actions select,
    .gallery-actions button {
        width: 100%;
    }
}

.image-details > p:not(.image-upload-status) {
    color: var(--mint);
    font-size: 12px;
    font-weight: 600;
    margin-top: 18px;
    margin-bottom: -7px;
}

/* Image card text spacing */
.image-card {
    min-width: 0;
    overflow: hidden;
    gap: 12px;
}

.image-details {
    min-width: 0;
    overflow-wrap: anywhere;
}

.image-details h3 {
    margin-bottom: 8px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.image-details p {
    margin: 6px 0;
    line-height: 1.6;
}

/* Link labels */
.image-card > p {
    margin: 12px 0 6px;
    line-height: 1.5;
    font-weight: 600;
    color: #69E6B0;
}

/* Link inputs */
.gallery-link {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
}

.gallery-link input {
    flex: 1;
    min-width: 0;
    width: 100%;
    font-size: 12px;
    padding: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-link button {
    flex-shrink: 0;
}

/* Remove button spacing */
.gallery-remove {
    margin-top: 12px;
}

/* Small screens */
@media (max-width: 480px) {
    .image-card {
        padding: 14px;
    }

    .gallery-link {
        gap: 6px;
    }

    .gallery-link input {
        font-size: 11px;
    }

    .gallery-link button {
        padding: 9px 12px;
    }
}