/* Main CSS with modern design and effects */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

:root {
    --bg-gradient: linear-gradient(135deg, #0f1729 0%, #2c1f4a 100%);
    --text-color: #e6e6ff;
    --accent-color: #8585cc;
    --input-bg: rgba(255, 255, 255, 0.1);
    --input-border: rgba(255, 255, 255, 0.2);
    --input-hover-bg: rgba(255, 255, 255, 0.15);
    --transition-speed: 0.3s;
    --hover-scale: 1.05;
    --glow-color: rgba(133, 133, 204, 0.8);
    --category-title-gradient: linear-gradient(45deg, #8585cc, #2c1f4a);
    --category-bg: rgba(255, 255, 255, 0.1);
    --app-bg: rgba(255, 255, 255, 0.1);
    --app-border: rgba(255, 255, 255, 0.2);
    --app-hover-bg: rgba(255, 255, 255, 0.15);
    --app-hover-border: rgba(255, 255, 255, 0.2);
    --app-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    --app-hover-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    height: 100%;
    font-family: 'Roboto', sans-serif;
    color: var(--text-color);
    background: var(--bg-gradient);
    overflow-x: hidden;
    scroll-behavior: smooth;
    position: relative;
}

/* Enhanced Background Effects */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(106, 130, 251, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(106, 130, 251, 0.15) 0%, transparent 50%);
    z-index: -2;
    animation: pulse 8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(45deg, transparent 45%, rgba(106, 130, 251, 0.1) 50%, transparent 55%),
        linear-gradient(-45deg, transparent 45%, rgba(106, 130, 251, 0.1) 50%, transparent 55%);
    background-size: 60px 60px;
    z-index: -2;
    opacity: 0.3;
    animation: gridMove 20s linear infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(1); opacity: 0.5; }
}

@keyframes gridMove {
    0% { background-position: 0 0; }
    100% { background-position: 60px 60px; }
}

/* Navigation */
nav {
    position: fixed;
    top: 30px;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 1000;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 40px;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px 30px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
}

.nav-links li a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 400;
    transition: all var(--transition-speed) ease;
    position: relative;
    padding: 5px 0;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    transition: width var(--transition-speed) ease;
}

.nav-links li a:hover::after {
    width: 100%;
}

.nav-links li a:hover {
    color: #fff;
    text-shadow: 0 0 10px var(--accent-color);
}

/* Main Content */
.inputstuff {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
    z-index: 1;
}

#veil {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 30px;
    background: linear-gradient(45deg, #fff, #8585cc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(133, 133, 204, 0.3);
    animation: titleGlow 3s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% { filter: brightness(1) blur(0); }
    50% { filter: brightness(1.2) blur(1px); }
}

#form input {
    padding: 15px 25px;
    border-radius: 50px;
    border: 2px solid rgba(133, 133, 204, 0.3);
    background: rgba(15, 23, 41, 0.6);
    color: var(--text-color);
    outline: none;
    width: 300px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
    backdrop-filter: blur(10px);
}

#form input:focus, #form input:hover {
    width: 400px;
    border-color: var(--accent-color);
    box-shadow: 0 0 30px rgba(133, 133, 204, 0.3);
    background: rgba(15, 23, 41, 0.8);
}

/* Floating Elements */
.floating {
    position: fixed;
    pointer-events: none;
    z-index: 0;
}

.floating:nth-child(1) {
    top: 20%;
    left: 20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle at center, rgba(133, 133, 204, 0.2), transparent 70%);
    animation: float1 20s ease-in-out infinite;
}

.floating:nth-child(2) {
    bottom: 20%;
    right: 20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle at center, rgba(106, 130, 251, 0.2), transparent 70%);
    animation: float2 15s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(30px, -30px) rotate(180deg); }
}

@keyframes float2 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-20px, 20px) rotate(-180deg); }
}

/* Time Bar */
.time-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.4);
    color: var(--text-color);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 1rem;
    font-family: monospace;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(133, 133, 204, 0.3);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6b6baa;
}

/* Additional Decorative Styles */

::selection {
    background-color: var(--accent-color);
    color: #fff;
}

/* Smooth transitions for links and inputs */
a, input {
    transition: all 0.3s ease;
}

/* Hover effects for interactive elements */
.nav-links li {
    transition: transform 0.3s ease-in-out;
}

.nav-links li:hover {
    transform: scale(1.5);
}

/* Subtle animations for title */
@keyframes glow {
    0% {
        text-shadow: 0 0 10px rgba(106, 130, 251, 0.3);
        transform: scale(1);
    }
    50% {
        text-shadow: 0 0 20px rgba(106, 130, 251, 0.8);
        transform: scale(1.02);
    }
    100% {
        text-shadow: 0 0 10px rgba(106, 130, 251, 0.3);
        transform: scale(1);
    }
}

#ambience {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    background: 
        radial-gradient(circle at 20% 20%, rgba(106, 130, 251, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(106, 130, 251, 0.2) 0%, transparent 50%);
    animation: ambiencePulse 8s ease-in-out infinite;
}

#ambience::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(45deg, transparent 45%, rgba(106, 130, 251, 0.1) 50%, transparent 55%),
        linear-gradient(-45deg, transparent 45%, rgba(106, 130, 251, 0.1) 50%, transparent 55%);
    background-size: 60px 60px;
    opacity: 0.3;
    animation: ambienceGrid 20s linear infinite;
}

#ambience::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 30% 30%, rgba(255,255,255,0.1) 0%, transparent 2%),
        radial-gradient(circle at 70% 70%, rgba(255,255,255,0.1) 0%, transparent 2%),
        radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 0%, transparent 2%);
    opacity: 0.5;
    animation: ambienceTwinkle 4s ease-in-out infinite;
}

@keyframes ambiencePulse {
    0% {
        background-position: 0% 0%;
    }
    50% {
        background-position: 100% 100%;
    }
    100% {
        background-position: 0% 0%;
    }
}

@keyframes ambienceGrid {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 60px 60px;
    }
}

@keyframes ambienceTwinkle {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.6;
    }
}

#ambience video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
    transition: transform 0.5s ease;
    filter: brightness(0.8) contrast(1.2);
}

#ambience:hover video {
    transform: translate(-50%, -50%) scale(1.02);
    filter: brightness(1) contrast(1.1);
}

.ambience-particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    pointer-events: none;
}

.ambience-particle:nth-child(1) {
    top: 20%;
    left: 20%;
    animation: particleFloat1 15s ease-in-out infinite;
}

.ambience-particle:nth-child(2) {
    top: 60%;
    left: 80%;
    animation: particleFloat2 20s ease-in-out infinite;
}

.ambience-particle:nth-child(3) {
    top: 80%;
    left: 40%;
    animation: particleFloat3 18s ease-in-out infinite;
}

@keyframes particleFloat1 {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: translate(50px, -50px) scale(1.5);
        opacity: 0.8;
    }
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.5;
    }
}

@keyframes particleFloat2 {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: translate(-50px, 50px) scale(1.5);
        opacity: 0.8;
    }
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.5;
    }
}

@keyframes particleFloat3 {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: translate(30px, -30px) scale(1.5);
        opacity: 0.8;
    }
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.5;
    }
}

/* Apps Section - Updated for centered layout */
.apps-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding-top: 300px;
}

/* Updated grid layout */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 40px;
    padding: 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    justify-items: center;
}

/* App button styling */
.app-button {
    width: 160px;
    height: 160px;
    padding: 20px;
    border: 2px solid rgba(133, 133, 204, 0.3);
    border-radius: 15px;
    background: rgba(15, 23, 41, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.app-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 15px;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: -1;
}

.app-button:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 0 30px rgba(133, 133, 204, 0.4);
    background: rgba(25, 33, 51, 0.9);
}

.app-button img {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    transition: transform 0.3s ease;
    pointer-events: none;
}

.app-button span {
    color: var(--text-color);
    font-size: 16px;
    text-align: center;
    margin-top: 10px;
    pointer-events: none;
}

/* Search styling update */
.search-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto 100px;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

#searchApps {
    width: 100%;
    padding: 18px 30px;
    border: 2px solid rgba(133, 133, 204, 0.3);
    border-radius: 30px;
    background: rgba(15, 23, 41, 0.8);
    color: var(--text-color);
    font-size: 18px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

#searchApps:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 30px rgba(133, 133, 204, 0.3);
    background: rgba(15, 23, 41, 0.8);
}

#searchApps::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Hide apps that don't match search */
.app-button.hidden {
    display: none;
}
  