/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Exo 2', sans-serif;
}

body {
    background: linear-gradient(135deg, #0c0c0c, #1a1a2e, #16213e);
    color: #e0e0e0;
    min-height: 100vh;
    overflow-x: hidden;
}

.hidden {
    display: none !important;
}

/* Welcome Screen */
.welcome-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: radial-gradient(circle at center, #0a0a0a 0%, #000000 100%);
    position: relative;
    overflow: hidden;
}

.welcome-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(0, 150, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 0, 150, 0.1) 0%, transparent 50%);
    z-index: 0;
}

.welcome-container {
    position: relative;
    z-index: 2;
    background: rgba(20, 20, 40, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px 60px;
    width: 90%;
    max-width: 800px;
    border: 1px solid rgba(0, 200, 255, 0.3);
    box-shadow: 
        0 0 30px rgba(0, 150, 255, 0.5),
        inset 0 0 20px rgba(0, 150, 255, 0.1);
    text-align: center;
}

.welcome-header {
    margin-bottom: 40px;
}

.title-glitch {
    font-family: 'Orbitron', sans-serif;
    font-size: 3.5rem;
    font-weight: 900;
    color: #00eeff;
    text-shadow: 
        0 0 10px #00eeff,
        0 0 20px #00eeff,
        0 0 30px #00eeff,
        2px 2px 0 #ff00ff,
        -2px -2px 0 #00ffaa;
    animation: glitch 3s infinite;
    margin-bottom: 10px;
}

@keyframes glitch {
    0%, 100% { transform: translate(0); }
    5% { transform: translate(-2px, 2px); }
    10% { transform: translate(2px, -2px); }
    15% { transform: translate(-2px, -2px); }
    20% { transform: translate(2px, 2px); }
    25% { transform: translate(0); }
}

.subtitle {
    font-size: 1.2rem;
    color: #a0a0ff;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.animation-area {
    position: relative;
    height: 200px;
    margin: 30px 0;
    border-radius: 10px;
    background: rgba(0, 10, 30, 0.5);
    overflow: hidden;
    border: 1px solid rgba(0, 200, 255, 0.2);
}

.particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #00eeff;
    border-radius: 50%;
    animation: float 6s infinite linear;
}

.particle:nth-child(1) { top: 10%; left: 20%; animation-delay: 0s; }
.particle:nth-child(2) { top: 30%; left: 70%; animation-delay: 1s; }
.particle:nth-child(3) { top: 60%; left: 40%; animation-delay: 2s; }
.particle:nth-child(4) { top: 80%; left: 10%; animation-delay: 3s; }
.particle:nth-child(5) { top: 50%; left: 90%; animation-delay: 4s; }

@keyframes float {
    0% { transform: translateY(0) translateX(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100px) translateX(50px); opacity: 0; }
}

.hologram {
    position: absolute;
    width: 80%;
    height: 60%;
    top: 20%;
    left: 10%;
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 5px;
}

.hologram-line {
    position: absolute;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #00ffff, transparent);
    animation: scan 2s infinite linear;
}

.hologram-line:nth-child(1) { top: 25%; animation-delay: 0s; }
.hologram-line:nth-child(2) { top: 50%; animation-delay: 0.66s; }
.hologram-line:nth-child(3) { top: 75%; animation-delay: 1.33s; }

@keyframes scan {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.scan-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ff00ff, transparent);
    top: 50%;
    animation: scan-line 3s infinite ease-in-out;
}

@keyframes scan-line {
    0% { top: 0%; opacity: 0; }
    50% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

.password-form {
    margin: 30px 0;
}

.input-group {
    display: flex;
    max-width: 500px;
    margin: 0 auto 20px;
    border-radius: 50px;
    overflow: hidden;
    border: 2px solid #00aaff;
    background: rgba(0, 20, 40, 0.8);
}

.input-group i {
    padding: 15px 20px;
    background: #00aaff;
    color: #000;
    font-size: 1.2rem;
}

#password-input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 1.1rem;
    outline: none;
}

#password-input::placeholder {
    color: #88aaff;
}

#password-submit {
    padding: 15px 30px;
    background: linear-gradient(90deg, #00aaff, #0088ff);
    color: white;
    border: none;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
}

#password-submit:hover {
    background: linear-gradient(90deg, #00ccff, #0099ff);
    box-shadow: 0 0 15px #00aaff;
}

.hint {
    color: #88aaff;
    font-size: 0.9rem;
}

.welcome-footer p {
    margin-top: 30px;
    color: #66aaff;
    font-size: 0.9rem;
}

.welcome-footer i {
    margin: 0 5px;
}

/* Main Content */
.main-content {
    padding: 20px;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: rgba(10, 15, 30, 0.9);
    border-bottom: 2px solid #00aaff;
    box-shadow: 0 5px 20px rgba(0, 100, 255, 0.3);
    flex-wrap: wrap;
}

.header-left h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    color: #00eeff;
    margin-bottom: 5px;
}

.header-left p {
    color: #a0a0ff;
    font-size: 0.9rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 30px;
}

.stats {
    display: flex;
    gap: 20px;
    background: rgba(0, 30, 60, 0.7);
    padding: 10px 20px;
    border-radius: 10px;
    border: 1px solid #00aaff;
}

.stats span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #88ddff;
}

.logout-btn {
    padding: 10px 20px;
    background: linear-gradient(90deg, #ff3366, #ff0066);
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: linear-gradient(90deg, #ff5588, #ff2288);
    box-shadow: 0 0 15px #ff3366;
}

/* Controls */
.container {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(20, 25, 50, 0.7);
    border-radius: 15px;
    border: 1px solid rgba(0, 200, 255, 0.3);
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(0, 20, 40, 0.8);
    border-radius: 50px;
    padding: 10px 20px;
    border: 1px solid #00aaff;
    flex: 1;
    max-width: 400px;
}

.search-box i {
    color: #00aaff;
    margin-right: 10px;
}

#search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    font-size: 1rem;
    outline: none;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    background: rgba(0, 40, 80, 0.7);
    color: #88aaff;
    border: 1px solid #0088ff;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn.active, .filter-btn:hover {
    background: linear-gradient(90deg, #0088ff, #00aaff);
    color: white;
    box-shadow: 0 0 10px #0088ff;
}

.sort-select {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #88aaff;
}

#sort-select {
    background: rgba(0, 20, 40, 0.8);
    color: white;
    border: 1px solid #00aaff;
    border-radius: 5px;
    padding: 8px 15px;
    outline: none;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.card {
    background: linear-gradient(145deg, rgba(20, 25, 50, 0.9), rgba(10, 15, 30, 0.9));
    border-radius: 15px;
    padding: 20px;
    height: 200px;
    border: 1px solid rgba(0, 200, 255, 0.3);
    box-shadow: 0 5px 15px rgba(0, 100, 255, 0.2);
    display: flex;
    align-items: center;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #00eeff, #ff00ff);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 150, 255, 0.4);
    border-color: #00eeff;
}

.card-image {
    width: 160px;
    height: 160px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid #00aaff;
    margin-right: 20px;
    flex-shrink: 0;
}

.card-content {
    flex: 1;
}

.card-title {
    font-size: 1.3rem;
    color: #00eeff;
    margin-bottom: 8px;
    font-weight: 600;
}

.card-description {
    font-size: 0.9rem;
    color: #a0a0ff;
    margin-bottom: 15px;
    line-height: 1.4;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 0.8rem;
    color: #88aaff;
}

.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px;
    background: linear-gradient(90deg, #00aaff, #0088ff);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.download-btn:hover {
    background: linear-gradient(90deg, #00ccff, #0099ff);
    box-shadow: 0 0 15px #00aaff;
}

/* Footer Info */
.footer-info {
    text-align: center;
    padding: 20px;
    background: rgba(10, 15, 30, 0.8);
    border-radius: 10px;
    border: 1px solid rgba(0, 150, 255, 0.3);
    margin-top: 30px;
}

.footer-info p {
    margin: 10px 0;
    color: #88aaff;
    font-size: 0.9rem;
}

.status-online {
    color: #00ff88;
    font-weight: bold;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: linear-gradient(145deg, #0a0a1a, #1a1a2e);
    width: 90%;
    max-width: 600px;
    border-radius: 20px;
    border: 2px solid #00aaff;
    box-shadow: 0 0 40px rgba(0, 150, 255, 0.7);
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: rgba(0, 30, 60, 0.9);
    border-bottom: 1px solid #00aaff;
}

.modal-header h2 {
    color: #00eeff;
    font-family: 'Orbitron', sans-serif;
}

.close-modal {
    background: none;
    border: none;
    color: #ff3366;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    padding: 30px;
}

.file-info {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

#modal-image {
    width: 160px;
    height: 160px;
    border-radius: 10px;
    border: 2px solid #00aaff;
    object-fit: cover;
}

.file-info div {
    flex: 1;
}

#modal-title {
    color: #00eeff;
    font-size: 1.8rem;
    margin-bottom: 10px;
}

#modal-description {
    color: #a0a0ff;
    margin-bottom: 15px;
}

.progress-container {
    margin: 30px 0;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: rgba(0, 40, 80, 0.8);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #00aaff;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00aaff, #00ffaa);
    width: 0%;
    transition: width 0.3s;
}

.progress-text {
    text-align: center;
    margin-top: 10px;
    color: #88aaff;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
}

.btn-primary, .btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(90deg, #00aaff, #0088ff);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(90deg, #00ccff, #0099ff);
    box-shadow: 0 0 15px #00aaff;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #88aaff;
    border: 1px solid #88aaff;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Enhanced Welcome Animations */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes colorShift {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

.welcome-container {
    animation: colorShift 20s infinite linear;
}

.title-glitch {
    animation: glitch 3s infinite, pulse 2s infinite alternate;
}

.subtitle {
    animation: pulse 3s infinite alternate;
}

.animation-area {
    position: relative;
}

.animation-area::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.1), transparent);
    animation: shine 3s infinite linear;
}

@keyframes shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Additional particles */
.particle:nth-child(6) { top: 20%; left: 50%; animation-delay: 0.5s; }
.particle:nth-child(7) { top: 70%; left: 30%; animation-delay: 1.5s; }
.particle:nth-child(8) { top: 40%; left: 80%; animation-delay: 2.5s; }
.particle:nth-child(9) { top: 90%; left: 60%; animation-delay: 3.5s; }
.particle:nth-child(10) { top: 10%; left: 90%; animation-delay: 4.5s; }

/* Responsive */
@media (max-width: 768px) {
    .welcome-container {
        padding: 30px 20px;
    }
    .title-glitch {
        font-size: 2.5rem;
    }
    .main-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    .header-right {
        flex-direction: column;
        gap: 15px;
    }
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    .search-box {
        max-width: 100%;
    }
    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    .card {
        flex-direction: column;
        height: auto;
        padding: 15px;
    }
    .card-image {
        width: 120px;
        height: 120px;
        margin-right: 0;
        margin-bottom: 15px;
    }
    .file-info {
        flex-direction: column;
        text-align: center;
    }
    #modal-image {
        margin: 0 auto;
    }
}
