/* Ellabm Upload Page - Yellow Happy Theme */
:root {
    --primary: #FFD700;
    --primary-dark: #E6C200;
    --background: #FFFDE7;
    --accent: #FF6B6B;
    --text: #333;
    --text-light: #666;
    --white: #fff;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --radius: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
    background: var(--background);
    color: var(--text);
    min-height: 100vh;
    min-height: 100dvh;
}

.hidden { display: none !important; }

/* Password Gate */
#password-gate {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary) 0%, #FFA500 100%);
}

.gate-content {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px 30px;
    text-align: center;
    box-shadow: var(--shadow);
    max-width: 360px;
    width: 100%;
}

.gate-content h1 {
    font-size: 4rem;
    margin-bottom: 10px;
}

.gate-content h2 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    color: var(--text);
}

.gate-content p {
    color: var(--text-light);
    margin-bottom: 20px;
}

#password-input {
    width: 100%;
    padding: 14px;
    font-size: 1.5rem;
    text-align: center;
    border: 3px solid var(--primary);
    border-radius: 12px;
    outline: none;
    letter-spacing: 0.5em;
    margin-bottom: 16px;
    transition: border-color 0.2s;
}

#password-input:focus {
    border-color: var(--accent);
}

#password-submit {
    width: 100%;
    padding: 14px;
    font-size: 1.2rem;
    font-weight: 700;
    background: var(--primary);
    color: var(--text);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

#password-submit:hover {
    background: var(--primary-dark);
}

#password-submit:active {
    transform: scale(0.97);
}

.error {
    color: var(--accent) !important;
    font-weight: 600;
    margin-top: 12px;
}

/* Upload Section */
#upload-section {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2rem;
    color: var(--text);
    margin-bottom: 10px;
}

.body-text {
    color: var(--text-light);
    line-height: 1.6;
}

/* Upload Area */
#upload-area {
    margin-bottom: 20px;
}

#drop-zone {
    border: 3px dashed var(--primary);
    border-radius: var(--radius);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    background: var(--white);
    position: relative;
}

#drop-zone:hover,
#drop-zone.dragover {
    background: #FFF8C4;
    border-color: var(--primary-dark);
}

#drop-zone p {
    font-size: 1.1rem;
    color: var(--text-light);
    font-weight: 500;
}

#file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

#uploader-name-section {
    margin-top: 12px;
}

#uploader-name {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    outline: none;
    background: var(--white);
    transition: border-color 0.2s;
}

#uploader-name:focus {
    border-color: var(--primary);
}

/* Preview Area */
#preview-area {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.preview-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 1;
    background: #eee;
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-item .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: var(--accent);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 14px;
    line-height: 24px;
    text-align: center;
    cursor: pointer;
}

.preview-item.uploading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.7);
}

.preview-item.done {
    border: 3px solid #4CAF50;
}

.preview-item.failed {
    border: 3px solid var(--accent);
}

/* Progress */
#progress-area {
    margin-bottom: 20px;
    text-align: center;
}

#progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

#progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s;
}

#progress-text {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Upload Status */
#upload-status {
    text-align: center;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 600;
}

#upload-status.success {
    background: #E8F5E9;
    color: #2E7D32;
}

#upload-status.error {
    background: #FFEBEE;
    color: #C62828;
}

/* Gallery Link */
.gallery-link {
    display: block;
    text-align: center;
    padding: 16px;
    background: var(--white);
    border: 2px solid var(--primary);
    border-radius: 12px;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 30px;
    transition: background 0.2s;
}

.gallery-link:hover {
    background: #FFF8C4;
}

footer {
    text-align: center;
    padding: 20px 0;
    color: var(--text-light);
    font-size: 0.9rem;
}
