/* Base Styles */
:root {
    --primary-color: #4f46e5;
    --primary-gradient: linear-gradient(to right, #9333ea, #4f46e5);
    --background-color: #0f172a;
    --card-color: rgba(255, 255, 255, 0.05);
    --text-color: #ffffff;
    --text-secondary: #a1a1aa;
    --border-color: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(to bottom, #0f172a, #1e293b);
    color: var(--text-color);
    min-height: 100vh;
    line-height: 1.5;
}

button {
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
}

/* Layout */
#app {
    min-height: 100vh;
    position: relative;
}

.section {
    display: none;
    min-height: 100vh;
}

.section.active {
    display: block;
}

/* Login Section Styles */
.login-container {
    max-width: 480px;
    width: 90%;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin: 2rem auto;
    border: 1px solid var(--border-color);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    background: var(--primary-gradient);
    border-radius: 50%;
    margin-bottom: 1rem;
    color: white;
}

.login-header h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.login-header p {
    color: var(--text-secondary);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    color: #d1d5db;
}

.form-group input[type="text"] {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
}

.form-group input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

.ip-display {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: #a1a1aa;
}

.form-note {
    font-size: 0.75rem;
    color: #71717a;
    margin-top: 0.25rem;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
}

.checkbox-group input[type="checkbox"] {
    margin-top: 0.25rem;
    margin-right: 0.75rem;
}

.checkbox-group label {
    font-size: 0.875rem;
    cursor: pointer;
}

.error-message {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid #ef4444;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    color: white;
    display: none;
}

.primary-button {
    width: 100%;
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.primary-button svg {
    margin-right: 0.5rem;
}

.primary-button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Gallery Section Styles */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    max-width: 1280px;
    margin: 0 auto;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.logout-button {
    background: rgba(239, 68, 68, 0.8);
    color: white;
    border: none;
    padding: 0.25rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background-color 0.2s;
}

.logout-button:hover {
    background: rgba(239, 68, 68, 1);
}

.gallery-main {
    padding-top: 5rem;
    padding-bottom: 2rem;
}

.gallery-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

.gallery-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.gallery-subtitle {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.user-info {
    margin-bottom: 1.5rem;
}

.user-name {
    color: #a78bfa;
    font-weight: 600;
}

.user-ip {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.gallery-controls {
    display: flex;
    flex-direction: column;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .gallery-controls {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .tabs {
        margin-bottom: 0;
    }
}

.tab-button {
    padding: 0.5rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    border: none;
}

.tab-button.active {
    background: var(--primary-gradient);
    color: white;
}

.tab-button:hover:not(.active) {
    background: rgba(255, 255, 255, 0.2);
}

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

@media (min-width: 768px) {
    .search-container {
        width: 16rem;
    }
}

.search-container svg {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.search-container input {
    width: 100%;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    background: #333;
    border: none;
    border-radius: 6px;
    color: white;
    font-family: 'Poppins', sans-serif;
}

.search-container input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

.gallery-tab {
    display: none;
}

.gallery-tab.active {
    display: block;
}

/* Image Grid */
.image-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 640px) {
    .image-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    .image-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    .image-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.image-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1/1;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.image-item:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.image-item:hover img {
    transform: scale(1.1);
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.image-item:hover .image-overlay {
    opacity: 1;
}

.image-title {
    color: white;
    font-weight: 500;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-artist {
    color: var(--text-secondary);
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1280px) {
    .video-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.video-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16/9;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.video-item:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}

.video-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.video-item:hover img {
    transform: scale(1.1);
}

.video-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.video-item:hover .video-overlay {
    opacity: 1;
}

.video-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, transform 0.3s;
    opacity: 0.8;
}

.video-item:hover .video-play-button {
    background: #ef4444;
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 1;
}

.video-play-button svg {
    width: 1.5rem;
    height: 1.5rem;
    fill: white;
}

.video-title {
    color: white;
    font-weight: 500;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-artist {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.video-details {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.video-duration {
    background: rgba(0, 0, 0, 0.4);
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    color: white;
}

.video-category {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2rem;
    margin-bottom: 3rem;
    gap: 0.5rem;
}

.pagination-button {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    background: #1f2937;
    color: white;
    border: none;
    transition: background 0.2s;
}

.pagination-button:hover:not(:disabled) {
    background: #374151;
}

.pagination-button:disabled {
    background: #4b5563;
    color: #9ca3af;
    cursor: not-allowed;
}

.pagination-button svg {
    width: 1.125rem;
    height: 1.125rem;
}

#prev-images svg, #prev-videos svg {
    margin-right: 0.25rem;
}

#next-images svg, #next-videos svg {
    margin-left: 0.25rem;
}

.pagination-info {
    color: var(--text-secondary);
    padding: 0 1rem;
}

/* Lightbox Styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.close-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: background 0.2s;
    z-index: 10;
}

.close-button:hover {
    background: rgba(0, 0, 0, 0.8);
}

.lightbox-content {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-image-container {
    position: relative;
    margin-bottom: 1.5rem;
    max-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#lightbox-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 4px;
    user-select: none;
}

.watermark {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.25);
    transform: rotate(-30deg);
    pointer-events: none;
    text-align: center;
    white-space: nowrap;
}

.lightbox-info {
    text-align: center;
    max-width: 32rem;
}

#lightbox-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

#lightbox-artist {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

#lightbox-description {
    color: #d1d5db;
    margin-bottom: 1rem;
}

.copyright-notice {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Video Player Styles */
.video-player {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: black;
    z-index: 1000;
    display: none;
}

.video-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#video-element {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
}

/* Loading Message */
.loading-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}
