:root {
    --bg-color: #000000;
    --text-color: #ffffff;
    --text-secondary: #86868b;
    --accent-color: #0071e3;
    /* Apple Blue */
    --accent-hover: #0056b3;
    --glass-bg: rgba(28, 28, 30, 0.75);
    --glass-border: rgba(255, 255, 255, 0.1);
    --border-radius: 12px;
    --input-bg: rgba(28, 28, 30, 0.5);
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}


.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 20px;
    background: radial-gradient(circle at center, #1a1a1c 0%, #000 100%);
}

.auth-box {
    background: rgba(28, 28, 30, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.auth-box h1 {
    margin-bottom: 24px;
    font-weight: 600;
    font-size: 24px;
    letter-spacing: -0.5px;
}

.input-group {
    margin-bottom: 20px;
}

input[type="password"] {
    width: 100%;
    padding: 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #3a3a3c;
    border-radius: 12px;
    color: white;
    font-size: 17px;
    outline: none;
    transition: all 0.2s;
}

input[type="password"]:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(0, 113, 227, 0.3);
}

button {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s;
}

button:hover {
    background-color: #0077ED;
}

button:active {
    transform: scale(0.98);
}

.error-message {
    color: #ff453a;
    margin-top: 16px;
    font-size: 14px;
}


header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 600;
    font-size: 20px;
    letter-spacing: -0.5px;
    color: #fff;
}

.upload-btn-label {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--accent-color);
    padding: 8px 16px;
    border-radius: 18px;
    font-weight: 500;
    cursor: pointer;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.upload-btn-label:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

#file-input {
    display: none;
}


#upload-area-container {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.upload-area {
    background: rgba(28, 28, 30, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    margin: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.upload-area h3 {
    margin-bottom: 16px;
    font-weight: 500;
    color: var(--text-secondary);
}

.upload-previews {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 10px 4px;
    margin-top: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.preview-card {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.preview-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.progress-container {
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    height: 4px;
    overflow: hidden;
    display: none;
    width: 100%;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: var(--accent-color);
    transition: width 0.2s ease-out;
    box-shadow: 0 0 10px rgba(0, 113, 227, 0.5);
}

.upload-status {
    margin-top: 12px;
    font-size: 14px;
    color: var(--text-secondary);
    min-height: 20px;
}

.upload-actions {
    margin-top: 24px;
    display: flex;
    gap: 12px;
    justify-content: center;
}

.upload-actions button {
    width: auto;
    min-width: 120px;
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.05);
}


.gallery-container {
    padding: 20px;
    width: 100%;
    padding-bottom: 80px;
}


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


@media (min-width: 769px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: #2a2a2a;
    aspect-ratio: 1 / 1;
}

.gallery-item:hover {
    z-index: 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.2s;
}

.gallery-item:hover img {
    opacity: 0.9;
}

.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.2s ease;

}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-image-container {
    flex: 1;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.lightbox-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;

}

.lightbox.active .lightbox-img {
    transform: scale(1);
}

.lightbox-toolbar {
    height: 80px;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    gap: 15px;
}


.lightbox-nav {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
    line-height: 1;

}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-nav:active {
    transform: scale(0.95);
}

.lightbox-counter {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    font-weight: 500;
    min-width: 60px;
    text-align: center;
}

.lightbox-close {
    background: rgba(255, 50, 50, 0.2);
    color: #ff6b6b;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
    line-height: 1;

}

.lightbox-close:hover {
    background: rgba(255, 50, 50, 0.3);
}

.lightbox-spacer {
    flex: 1;

}


@media (max-width: 768px) {
    .gallery-container {
        padding: 2px;

    }

    .lightbox-toolbar {
        padding: 0 10px;
        gap: 10px;
        height: 70px;
    }

    .lightbox-nav,
    .lightbox-close {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
}