/* === Reset + Shared === */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    color: #1a1a1a;
}

.hidden {
    display: none !important;
}

/* === Upload Page === */

.upload-page {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f5;
    padding: 1rem;
}

.upload-card {
    background: #fff;
    border-radius: 1rem;
    padding: 2rem 1.5rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.upload-card h1 {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.25rem;
}

.upload-card .subtitle {
    text-align: center;
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.file-input-wrapper {
    margin-bottom: 1.25rem;
}

.file-input-wrapper input[type="file"] {
    width: 100%;
    padding: 0.75rem;
    border: 2px dashed #ccc;
    border-radius: 0.5rem;
    background: #fafafa;
    font-size: 1rem;
    cursor: pointer;
}

.upload-btn {
    display: block;
    width: 100%;
    padding: 0.875rem;
    border: none;
    border-radius: 0.5rem;
    background: #2563eb;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.upload-btn:hover {
    background: #1d4ed8;
}

.upload-btn:disabled {
    background: #93b4f5;
    cursor: not-allowed;
}

/* Progress */

.progress-area {
    margin-top: 1.25rem;
}

.progress-bar-track {
    width: 100%;
    height: 0.5rem;
    background: #e5e7eb;
    border-radius: 0.25rem;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: #2563eb;
    border-radius: 0.25rem;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.875rem;
    color: #555;
}

/* Messages */

.message-area {
    margin-top: 1.25rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.925rem;
    line-height: 1.4;
}

.message-area.success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.message-area.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* === Slideshow Page === */

.slideshow-page {
    width: 100vw;
    height: 100vh;
    background: #000;
    overflow: hidden;
    position: relative;
    cursor: none;
}

.slideshow-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.slideshow-photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slideshow-photo.active {
    opacity: 1;
}

.slideshow-empty {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #888;
    font-size: 1.5rem;
    text-align: center;
}

.photo-counter {
    position: fixed;
    bottom: 1rem;
    right: 1.25rem;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.85rem;
    font-weight: 500;
    pointer-events: none;
    z-index: 10;
}

/* === Admin Page === */

.admin-page {
    min-height: 100dvh;
    background: #f0f0f5;
    padding: 1.5rem;
}

.admin-container {
    max-width: 1000px;
    margin: 0 auto;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.admin-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.admin-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.photo-count {
    font-size: 0.95rem;
    color: #555;
    font-weight: 500;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-danger {
    background: #dc2626;
    color: #fff;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-danger:disabled {
    background: #f87171;
    cursor: not-allowed;
}

.btn-delete {
    width: 100%;
    padding: 0.4rem;
    border: none;
    border-radius: 0 0 0.5rem 0.5rem;
    background: #ef4444;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-delete:hover {
    background: #dc2626;
}

.btn-delete:disabled {
    background: #f87171;
    cursor: not-allowed;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.admin-card {
    background: #fff;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.admin-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}

.admin-empty {
    text-align: center;
    color: #888;
    font-size: 1.1rem;
    padding: 3rem 0;
}
