/* ===== Spinner ===== */
.spinner {
    width: 52px;
    height: 52px;
    border: 3px solid rgba(202, 190, 255, 0.12);
    border-top-color: #cabeff;
    border-radius: 50%;
    animation: lab42-spin 0.75s linear infinite;
}

@keyframes lab42-spin {
    to { transform: rotate(360deg); }
}

/* ===== State visibility ===== */
.state-hidden {
    display: none !important;
}

/* ===== Tool card selected ===== */
.tool-selected {
    border-color: #7C5CFF !important;
    box-shadow: 0 0 22px rgba(124, 92, 255, 0.28);
    background: rgba(124, 92, 255, 0.07) !important;
}

/* ===== Drop zone ===== */
.drop-zone-dashed {
    background-image: url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='12' ry='12' stroke='%237C5CFF' stroke-width='2' stroke-dasharray='10%2c 10' stroke-dashoffset='0' stroke-linecap='square'/%3e%3c/svg%3e");
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s, transform 0.15s;
}

.drop-zone-dim {
    background-image: url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='12' ry='12' stroke='%23484555' stroke-width='2' stroke-dasharray='10%2c 10' stroke-dashoffset='0' stroke-linecap='square'/%3e%3c/svg%3e");
}

.drop-active {
    background-color: rgba(124, 92, 255, 0.08) !important;
    transform: scale(1.01);
}

/* ===== File list items ===== */
.file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(21, 25, 34, 0.6);
    border: 1px solid #1D232B;
    border-radius: 8px;
    transition: border-color 0.2s;
}

.file-item + .file-item {
    margin-top: 8px;
}

.file-item:hover {
    border-color: rgba(124, 92, 255, 0.35);
}

.file-item .remove-btn {
    flex-shrink: 0;
    padding: 4px;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s, color 0.2s;
    background: none;
    border: none;
    color: #c9c4d8;
    display: flex;
    align-items: center;
}

.file-item .remove-btn:hover {
    opacity: 1;
    color: #ffb4ab;
}

/* ===== Process button disabled ===== */
#btn-process:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none !important;
}

/* ===== Lang buttons ===== */
.lang-active {
    color: #cabeff !important;
    font-weight: 700;
}

/* ===== Mobile menu ===== */
#mobile-nav {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 12px 24px 16px;
    border-top: 1px solid #1D232B;
    background: rgba(20, 18, 27, 0.98);
    backdrop-filter: blur(12px);
}

#mobile-nav.menu-open {
    display: flex;
}

/* ===== Success color ===== */
.text-success {
    color: #86efac;
}

.bg-success-soft {
    background: rgba(134, 239, 172, 0.08);
}

/* ===== Glass panel ===== */
.glass-panel {
    background: rgba(21, 25, 34, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid #1D232B;
}

/* ===== Glow on hover ===== */
.glow-hover:hover {
    box-shadow: 0 0 20px rgba(124, 92, 255, 0.2);
    border-color: #7C5CFF;
}

/* ===== Hero gradient ===== */
.hero-gradient {
    background: radial-gradient(circle at 50% 50%, rgba(124, 92, 255, 0.1) 0%, transparent 70%);
}

/* ===== Form inputs ===== */
.lab42-input {
    width: 100%;
    background: #f0eeff !important;
    border: 1px solid #1D232B;
    border-radius: 8px;
    padding: 10px 14px;
    color: #1a1625 !important;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 1.4;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.lab42-input::placeholder {
    color: #9d99ab !important;
}

.lab42-input:focus {
    border-color: #7C5CFF;
    box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.18);
    background: #f8f5ff !important;
}

.lab42-input[type="password"] {
    letter-spacing: 0.1em;
}

.tool-option-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #c9c4d8;
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}

.tool-option-hint {
    font-size: 12px;
    color: #938ea1;
    margin-top: 5px;
    line-height: 1.4;
}

/* ===== Responsive: 360px min width ===== */
@media (max-width: 400px) {
    /* Reduce drop zone padding on very small screens */
    #panel-drop,
    #panel-notool {
        padding: 32px 16px;
    }

    /* Reduce hero padding */
    .hero-gradient section {
        padding-top: 32px;
        padding-bottom: 24px;
    }
}

/* ===== Responsive: 1280px+ max width centering ===== */
@media (min-width: 1280px) {
    /* max-w-7xl already handles this via Tailwind */
    body {
        background-attachment: fixed;
    }
}

/* ===== Ad slot ===== */
.ad-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(21, 25, 34, 0.5);
    border: 1px solid #1D232B;
    border-radius: 8px;
    text-align: center;
    overflow: hidden;
    position: relative;
}

.ad-slot-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(201, 196, 216, 0.25);
    margin-bottom: 6px;
}

/* Bottom ad: visible on all screens */
.ad-slot-bottom {
    width: 100%;
    min-height: 90px;
    max-height: 120px;
}

/* Sidebar ad: hidden on mobile, visible on desktop (handled by lg:block in HTML) */
