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

:root {
    --primary-color: #ff6b9d;
    --secondary-color: #c06c84;
    --accent-color: #f67280;
    --dark-color: #355c7d;
    --light-color: #f8f9fa;
    --text-color: #2d3436;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    color: var(--text-color);
    background: #667eea;
    position: relative;
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('media/background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    z-index: -1;
}

.background-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

/* Home Page */
.home-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.home-container {
    text-align: center;
    max-width: 800px;
    width: 100%;
}

.home-header {
    margin-bottom: 50px;
    animation: fadeInDown 0.8s ease;
}

.rings-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
    display: flex;
    justify-content: center;
    align-items: center;
}

.rings-image {
    width: 120px;
    height: 120px;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.8));
}

.home-header h1 {
    font-size: 3rem;
    color: white;
    margin-bottom: 10px;
    text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.8), 
                 0 0 20px rgba(0, 0, 0, 0.5);
    font-weight: 700;
}

.subtitle {
    font-size: 1.5rem;
    color: white;
    font-weight: 400;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8),
                 0 0 15px rgba(0, 0, 0, 0.5);
}

.menu-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.menu-card {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    text-decoration: none;
    color: var(--text-color);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
    animation: fadeInUp 0.8s ease;
}

.menu-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.menu-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.menu-card h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.menu-card p {
    color: #6c757d;
    font-size: 1rem;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* Page Header */
.page-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
    animation: fadeInDown 0.6s ease;
}

.page-header h1 {
    color: white;
    font-size: 2rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8),
                 0 0 15px rgba(0, 0, 0, 0.5);
}

.back-btn {
    background: white;
    color: var(--dark-color);
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.back-btn:hover {
    transform: translateX(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* Upload Page */
.upload-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow);
    animation: fadeInUp 0.8s ease;
}

.upload-area {
    border: 3px dashed var(--primary-color);
    border-radius: 15px;
    padding: 60px 40px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.upload-area.drag-over {
    background: rgba(255, 107, 157, 0.1);
    border-color: var(--accent-color);
}

.upload-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.upload-area h2 {
    color: var(--text-color);
    margin-bottom: 10px;
}

.upload-area p {
    color: #6c757d;
    margin-bottom: 20px;
}

#fileInput {
    display: none;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.6);
}

.btn-secondary {
    background: white;
    color: var(--dark-color);
    border: 2px solid var(--dark-color);
}

.btn-secondary:hover {
    background: var(--dark-color);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.6);
}

.btn-block {
    width: 100%;
    margin-top: 20px;
}

/* File Preview */
.file-preview {
    margin: 30px 0;
}

.file-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.file-name {
    font-weight: 600;
    color: var(--text-color);
}

.file-meta {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Upload Info */
.upload-info {
    margin-top: 30px;
    text-align: center;
    color: #6c757d;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

/* Messages */
.success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid #28a745;
    animation: slideInRight 0.5s ease;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid #dc3545;
    animation: slideInRight 0.5s ease;
}

/* Album Page */
.empty-state {
    background: white;
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: var(--shadow);
    animation: fadeInUp 0.8s ease;
}

.empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.empty-state h2 {
    color: var(--text-color);
    margin-bottom: 10px;
}

.empty-state p {
    color: #6c757d;
    margin-bottom: 30px;
}

/* Media Grid */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.media-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    background: white;
    animation: fadeInUp 0.6s ease;
}

.media-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.media-item img,
.media-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #000;
}

.media-item video {
    pointer-events: none;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.media-item:hover .video-overlay {
    background: rgba(0, 0, 0, 0.5);
}

.play-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--dark-color);
    transition: all 0.3s ease;
}

.media-item:hover .play-icon {
    transform: scale(1.1);
    background: white;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-media {
    max-width: 100%;
    max-height: 90vh;
}

.lightbox-media img,
.lightbox-media video {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 10px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    background: #000;
}

.lightbox-media video {
    width: auto;
    height: auto;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: var(--dark-color);
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.lightbox-close {
    top: 20px;
    right: 20px;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: white;
    transform: scale(1.1);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Loading Overlay */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.loading-content {
    text-align: center;
    color: white;
    max-width: 400px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.loading-spinner {
    width: 80px;
    height: 80px;
    border: 8px solid rgba(255, 255, 255, 0.2);
    border-top: 8px solid var(--primary-color);
    border-radius: 50%;
    margin: 0 auto 30px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-content h2 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.loading-content p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 25px;
    font-size: 1rem;
}

.loading-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 20px;
}

.loading-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 10px;
    box-shadow: 0 0 20px var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .home-header h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .rings-icon {
        font-size: 60px;
    }
    
    .menu-options {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .menu-card {
        padding: 30px 20px;
    }
    
    .menu-icon {
        font-size: 50px;
    }
    
    .upload-card {
        padding: 20px;
    }
    
    .upload-area {
        padding: 40px 20px;
    }
    
    .upload-icon {
        font-size: 40px;
    }
    
    .media-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
}

@media (max-width: 480px) {
    .home-header h1 {
        font-size: 1.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .menu-card h2 {
        font-size: 1.2rem;
    }
    
    .media-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .loading-content {
        padding: 30px 20px;
        max-width: 90%;
    }
    
    .loading-spinner {
        width: 60px;
        height: 60px;
    }
    
    .loading-content h2 {
        font-size: 1.4rem;
    }
}

