/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: #0B0C10;
    color: #fff;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Animated gradient background (multi‑faceted shape‑shifting) */
.gradient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: linear-gradient(125deg, #0B0C10, #1a1a2e, #16213e, #0f3460);
    background-size: 400% 400%;
    animation: gradientShift 20s ease infinite;
    opacity: 0.8;
}

@keyframes gradientShift {
    0% { background-position: 0% 0%; }
    25% { background-position: 100% 0%; }
    50% { background-position: 100% 100%; }
    75% { background-position: 0% 100%; }
    100% { background-position: 0% 0%; }
}

/* Sparkle particle background */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(0, 255, 255, 0.5);
    border-radius: 50%;
    box-shadow: 0 0 10px #00FFFF;
    animation: floatParticle 8s infinite linear;
}

@keyframes floatParticle {
    0% { transform: translateY(100vh) translateX(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) translateX(20px); opacity: 0; }
}

/* ===== FUTURISTIC METALLIC UI ===== */
.glass-panel {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.glass-panel:hover {
    border-color: #00FFFF;
    box-shadow: 0 0 30px #00FFFF;
}

.glowing-button {
    background: #00FFFF;
    color: #0B0C10;
    font-weight: bold;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 0 15px #00FFFF;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.glowing-button:hover {
    box-shadow: 0 0 40px #00FFFF;
    transform: scale(1.05);
}

/* ===== COLORS ===== */
:root {
    --silver: #C0C0C0;
    --steel: #4682B4;
    --obsidian: #0B0C10;
    --electric-blue: #00FFFF;
    --royal-purple: #7851A9;
    --digital-gold: #FFD700;
}

/* ===== LAYOUT ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ===== HEADER ===== */
.glass-header {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
}

.glass-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
}

.logo-img {
    height: 40px;
    width: auto;
    filter: drop-shadow(0 0 8px var(--digital-gold));
    border-radius: 50%;
}

.logo-text {
    background: linear-gradient(135deg, var(--electric-blue), var(--royal-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#search-container {
    display: flex;
    gap: 0.5rem;
    margin: 0 1rem;
    flex: 1;
    max-width: 400px;
}

#search-input {
    flex: 1;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid var(--electric-blue);
    border-radius: 30px;
    color: white;
}

#search-btn {
    padding: 0.5rem 1rem;
}

nav a {
    color: white;
    text-decoration: none;
    margin-left: 1.5rem;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--electric-blue);
}

.btn-glow {
    background: transparent;
    border: 1px solid var(--electric-blue);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    box-shadow: 0 0 10px var(--electric-blue);
}

.btn-logout {
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

/* ===== HERO SECTION ===== */
.hero {
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--electric-blue);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: 2px 0 var(--royal-purple);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(31px, 9999px, 94px, 0); }
    20% { clip: rect(112px, 9999px, 76px, 0); }
    40% { clip: rect(85px, 9999px, 77px, 0); }
    60% { clip: rect(64px, 9999px, 53px, 0); }
    80% { clip: rect(45px, 9999px, 16px, 0); }
    100% { clip: rect(24px, 9999px, 98px, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(65px, 9999px, 9px, 0); }
    20% { clip: rect(147px, 9999px, 32px, 0); }
    40% { clip: rect(98px, 9999px, 140px, 0); }
    60% { clip: rect(10px, 9999px, 106px, 0); }
    80% { clip: rect(163px, 9999px, 47px, 0); }
    100% { clip: rect(78px, 9999px, 26px, 0); }
}

.hero-sub {
    font-size: 1.25rem;
    color: var(--silver);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn-outline {
    border: 1px solid white;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    color: white;
    transition: all 0.3s;
}

.btn-outline:hover {
    border-color: var(--electric-blue);
    color: var(--electric-blue);
}

.floating-card {
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 50px var(--digital-gold);
    animation: float 6s ease-in-out infinite;
}

.treasure-pot {
    width: 200px;
    height: 200px;
    background: linear-gradient(145deg, var(--digital-gold), #b8860b);
    border-radius: 50% 50% 30% 30%;
    position: relative;
    box-shadow: inset 0 -20px 20px rgba(0,0,0,0.5);
}

.treasure-pot::before {
    content: '';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 40px;
    background: linear-gradient(145deg, #daa520, #b8860b);
    border-radius: 20px 20px 0 0;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

/* ===== FEATURES ===== */
.features, .about-section, .build-section {
    padding: 4rem 0;
    background: rgba(0,0,0,0.3);
    margin-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--electric-blue);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 2rem;
    transition: transform 0.3s, border-color 0.3s;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--electric-blue);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--digital-gold);
}

.feature-card p {
    color: var(--silver);
}

/* About & Build sections */
.about-content, .build-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.1rem;
    color: var(--silver);
    line-height: 1.8;
}

.build-content {
    background: rgba(0, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 24px;
    border: 1px solid var(--electric-blue);
    box-shadow: 0 0 30px rgba(0,255,255,0.2);
}

.beta-badge {
    display: inline-block;
    background: var(--royal-purple);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 40px;
    font-weight: bold;
    margin-bottom: 2rem;
    box-shadow: 0 0 20px var(--royal-purple);
}

/* ===== DASHBOARD ===== */
.dashboard-view {
    display: none;
    padding: 2rem 0;
}

.dashboard-view.active {
    display: block;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid var(--electric-blue);
    border-radius: 16px;
    padding: 1rem;
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--electric-blue);
}

.stat-label {
    color: var(--silver);
    font-size: 0.9rem;
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* ===== AI ASSISTANT ===== */
.ai-assistant {
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    border-radius: 24px;
    padding: 1.5rem;
}

.ai-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.ai-avatar {
    width: 40px;
    height: 40px;
    background: var(--electric-blue);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--electric-blue);
}

.ai-messages {
    height: 200px;
    overflow-y: auto;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
}

.message {
    margin-bottom: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 18px;
    max-width: 80%;
}

.message.user {
    background: var(--electric-blue);
    color: var(--obsidian);
    margin-left: auto;
}

.message.assistant {
    background: rgba(255,255,255,0.1);
}

.ai-input {
    display: flex;
    gap: 0.5rem;
}

.ai-input input {
    flex: 1;
    padding: 0.75rem;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 24px;
    color: white;
}

.ai-input button {
    background: var(--electric-blue);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    box-shadow: 0 0 10px var(--electric-blue);
}

/* ===== VAULT GRID ===== */
.vault-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.vault-item {
    background: rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 1rem;
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s;
}
.vault-item:hover {
    border-color: var(--electric-blue);
}

.visibility-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    background: rgba(0,0,0,0.5);
}

.private { color: #ff6b6b; }
.public { color: #00ff00; }
.collaboration { color: #ff00ff; }

/* Folder tree styling */
.folder-tree {
    margin-left: 1.5rem;
    border-left: 1px dashed var(--electric-blue);
    padding-left: 1rem;
    font-size: 0.9rem;
}
.file-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0;
}
.file-item button {
    background: none;
    border: none;
    color: var(--electric-blue);
    cursor: pointer;
    font-size: 0.8rem;
}
.preview-iframe {
    width: 100%;
    height: 200px;
    border: 1px solid var(--electric-blue);
    border-radius: 8px;
    margin-top: 0.5rem;
}
video {
    max-width: 100%;
    border-radius: 8px;
}
.download-allowed {
    color: #00ff00;
}
.download-disallowed {
    color: #ff6b6b;
}

/* ===== CHAT ===== */
#online-users {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.online-user {
    background: rgba(0,255,255,0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 30px;
    border: 1px solid var(--electric-blue);
    cursor: pointer;
}
.chat-message {
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
}
.chat-message .sender {
    font-weight: bold;
    color: var(--electric-blue);
}

/* ===== FOOTER ===== */
.glass-footer {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem 0;
    margin-top: 4rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.social-icon {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    text-decoration: none;
    color: white;
}

.social-icon:hover {
    background: var(--electric-blue);
    color: var(--obsidian);
    transform: scale(1.2);
    box-shadow: 0 0 15px var(--electric-blue);
}

.copyright {
    text-align: center;
    color: var(--silver);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--silver);
    text-decoration: none;
    margin: 0 0.5rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--electric-blue);
}

.powered {
    color: var(--digital-gold);
}

/* ===== COOKIE BANNER ===== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 20, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--electric-blue);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-banner p {
    color: white;
    margin-right: 1rem;
}

.cookie-banner button {
    background: var(--electric-blue);
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

/* ===== MODALS ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #1a1a2e;
    border: 1px solid var(--electric-blue);
    border-radius: 24px;
    padding: 2rem;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    color: white;
    box-shadow: 0 0 50px var(--electric-blue);
}

.modal-content h2 {
    color: var(--digital-gold);
    margin-bottom: 1rem;
}

.modal-content .close {
    float: right;
    font-size: 2rem;
    cursor: pointer;
    color: var(--silver);
}

/* ===== UTILITY ===== */
.hidden {
    display: none;
}

.btn {
    background: transparent;
    border: 1px solid var(--electric-blue);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn:hover {
    background: var(--electric-blue);
    color: black;
}