@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@900&family=Rajdhani:wght@400;600&display=swap');

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

body {
    background: #000;
    color: #00ffff;
    font-family: 'Rajdhani', sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 0, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    position: relative;
    z-index: 1;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.logo-container {
    margin-bottom: 3rem;
    text-align: center;
}

.neon-logo-link {
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
}

.neon-logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 5rem;
    font-weight: 900;
    color: #00ffff;
    text-shadow: 
        0 0 10px #00ffff,
        0 0 20px #00ffff,
        0 0 30px #00ffff,
        0 0 40px #00ffff,
        0 0 70px #00ffff;
    animation: neon-pulse 2s ease-in-out infinite alternate;
    letter-spacing: 0.2em;
    text-transform: lowercase;
    word-wrap: break-word;
    padding: 0 1rem;
}

.neon-logo.small {
    font-size: 2rem;
    margin-bottom: 1rem;
}

@keyframes neon-pulse {
    from {
        text-shadow: 
            0 0 10px #00ffff,
            0 0 20px #00ffff,
            0 0 30px #00ffff,
            0 0 40px #00ffff,
            0 0 70px #00ffff;
    }
    to {
        text-shadow: 
            0 0 5px #00ffff,
            0 0 10px #00ffff,
            0 0 15px #00ffff,
            0 0 20px #00ffff,
            0 0 35px #00ffff,
            0 0 50px #ff00ff;
    }
}

.video-preview-container {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 4/3;
    margin-bottom: 2rem;
    border: 2px solid #00ffff;
    box-shadow: 0 0 10px #00ffff, inset 0 0 10px rgba(0, 255, 255, 0.2);
    overflow: hidden;
    background: #000;
}

.video-preview-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    width: 100%;
    max-width: 1200px;
    margin-bottom: 2rem;
}

.video-wrapper {
    position: relative;
    aspect-ratio: 4/3;
    border: 2px solid #00ffff;
    box-shadow: 0 0 10px #00ffff, inset 0 0 10px rgba(0, 255, 255, 0.2);
    overflow: hidden;
    background: #000;
}

.video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-label {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    color: #00ffff;
    text-shadow: 0 0 5px #00ffff;
    border: 1px solid #00ffff;
}

.controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 2rem;
}

.neon-button {
    background: transparent;
    border: 2px solid #00ffff;
    color: #00ffff;
    padding: 0.75rem 1.5rem;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-transform: lowercase;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 0 5px #00ffff;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3), inset 0 0 10px rgba(0, 255, 255, 0.1);
}

.neon-button:hover {
    color: #ff00ff;
    border-color: #ff00ff;
    text-shadow: 0 0 5px #ff00ff, 0 0 10px #ff00ff;
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.5), inset 0 0 20px rgba(255, 0, 255, 0.2);
    transform: translateY(-2px);
}

.neon-button.chaos:hover {
    color: #ff00aa;
    border-color: #ff00aa;
    animation: shake 0.3s;
}

.neon-button.small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.room-creation {
    margin-bottom: 2rem;
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.neon-input {
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #00ffff;
    color: #00ffff;
    padding: 0.75rem 1rem;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    width: 100%;
    margin-bottom: 1rem;
    text-shadow: 0 0 5px #00ffff;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3), inset 0 0 10px rgba(0, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.neon-input::placeholder {
    color: rgba(0, 255, 255, 0.5);
}

.neon-input:focus {
    outline: none;
    border-color: #ff00ff;
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.5), inset 0 0 20px rgba(255, 0, 255, 0.2);
    color: #ff00ff;
    text-shadow: 0 0 5px #ff00ff;
}

.chat-container {
    width: 100%;
    max-width: 600px;
    margin-bottom: 2rem;
    border: 2px solid #00ffff;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3), inset 0 0 10px rgba(0, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    max-height: 300px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    min-height: 150px;
    max-height: 200px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chat-message {
    padding: 0.5rem;
    background: rgba(0, 255, 255, 0.1);
    border-left: 2px solid #00ffff;
    color: #00ffff;
    font-size: 0.9rem;
    word-wrap: break-word;
    text-shadow: 0 0 3px rgba(0, 255, 255, 0.5);
}

.chat-message.own {
    background: rgba(255, 0, 255, 0.1);
    border-left-color: #ff00ff;
    color: #ff00ff;
    text-shadow: 0 0 3px rgba(255, 0, 255, 0.5);
    align-self: flex-end;
    text-align: right;
}

.chat-input-container {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    border-top: 1px solid rgba(0, 255, 255, 0.3);
}

.chat-input-container .neon-input {
    flex: 1;
    margin: 0;
}

.room-info {
    margin-bottom: 1rem;
    width: 100%;
    max-width: 600px;
}

.room-url {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    width: 100%;
}

.room-url .neon-input {
    flex: 1;
    min-width: 200px;
    margin: 0;
}

.room-url span {
    color: #00ffff;
    text-shadow: 0 0 5px #00ffff;
    font-weight: 600;
}

.password-section {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    width: 100%;
    max-width: 400px;
    justify-content: center;
}

.password-section .neon-input {
    flex: 1;
    margin: 0;
}

.status {
    color: #00ffff;
    text-shadow: 0 0 5px #00ffff;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    text-transform: lowercase;
}

.creator-credit {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    font-size: 0.7rem;
    color: #00ffff;
    text-shadow: 0 0 5px #00ffff, 0 0 10px #00ffff;
    font-family: 'Rajdhani', sans-serif;
    text-transform: lowercase;
    z-index: 10;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.creator-credit:hover {
    color: #ff00ff;
    text-shadow: 0 0 10px #ff00ff, 0 0 20px #ff00ff;
}

.glitch-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(0deg, rgba(255, 0, 255, 0.1) 0px, transparent 2px, transparent 4px, rgba(0, 255, 255, 0.1) 6px);
    pointer-events: none;
    z-index: 9999;
    animation: glitch 0.5s;
}

@keyframes glitch {
    0% { transform: translateX(0); }
    20% { transform: translateX(-2px); }
    40% { transform: translateX(2px); }
    60% { transform: translateX(-1px); }
    80% { transform: translateX(1px); }
    100% { transform: translateX(0); }
}

.room-container {
    justify-content: flex-start;
    padding-top: 2rem;
}

.turnstile-gate {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.turnstile-gate::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 0, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.gate-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    .neon-logo {
        font-size: 2rem;
        letter-spacing: 0.1em;
        padding: 0 0.5rem;
    }
    
    .neon-logo.small {
        font-size: 1.5rem;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .controls {
        flex-direction: column;
        width: 100%;
    }
    
    .neon-button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .neon-logo {
        font-size: 1.5rem;
        letter-spacing: 0.05em;
    }
    
    .neon-logo.small {
        font-size: 1.2rem;
    }
    
    .gate-content {
        gap: 2rem;
        padding: 1rem;
    }
}
