* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: #000000;
    min-height: 100vh;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

/* Animated Background Canvas */
#background-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* Cyber Wave Background */
.cyber-waves {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 300px;
    z-index: 1;
    opacity: 0.4;
}

.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: linear-gradient(180deg, 
        transparent 0%, 
        rgba(99, 102, 241, 0.1) 50%, 
        rgba(139, 92, 246, 0.2) 100%);
    animation: waveMove 15s linear infinite;
}

.wave:nth-child(2) {
    animation-duration: 20s;
    animation-delay: -5s;
    opacity: 0.5;
    background: linear-gradient(180deg, 
        transparent 0%, 
        rgba(236, 72, 153, 0.1) 50%, 
        rgba(139, 92, 246, 0.15) 100%);
}

.wave:nth-child(3) {
    animation-duration: 25s;
    animation-delay: -10s;
    opacity: 0.3;
    background: linear-gradient(180deg, 
        transparent 0%, 
        rgba(6, 182, 212, 0.1) 50%, 
        rgba(99, 102, 241, 0.1) 100%);
}

@keyframes waveMove {
    0% { transform: translateX(0) translateZ(0) scaleY(1); }
    50% { transform: translateX(-25%) translateZ(0) scaleY(1.2); }
    100% { transform: translateX(-50%) translateZ(0) scaleY(1); }
}

/* Floating Hexagons */
.hexagon {
    position: absolute;
    width: 100px;
    height: 100px;
    opacity: 0.1;
    animation: hexFloat 20s infinite ease-in-out;
}

@keyframes hexFloat {
    0%, 100% { 
        transform: translateY(0) rotate(0deg);
        opacity: 0.05;
    }
    50% { 
        transform: translateY(-50px) rotate(180deg);
        opacity: 0.15;
    }
}

/* Glitch Grid */
.grid-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: gridGlitch 8s steps(1) infinite;
    z-index: 2;
}

@keyframes gridGlitch {
    0%, 90% { 
        opacity: 1;
        transform: translate(0, 0);
    }
    91% { 
        opacity: 0.5;
        transform: translate(2px, 2px);
    }
    92% { 
        opacity: 1;
        transform: translate(-2px, -2px);
    }
    93%, 100% { 
        opacity: 1;
        transform: translate(0, 0);
    }
}

/* Main Container */
.login-container {
    position: relative;
    z-index: 10;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow-y: auto;
}

/* Glass Card */
.glass-card {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 24px;
    padding: 3rem;
    max-width: 480px;
    width: 100%;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: slideUp 0.6s ease-out;
    margin: auto;
    flex-shrink: 0;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Logo Section */
.logo-container {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    filter: drop-shadow(0 0 30px rgba(99, 102, 241, 0.6));
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.title {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #a5b4fc, #c4b5fd, #f0abfc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.subtitle {
    color: #94a3b8;
    font-size: 0.95rem;
    font-weight: 500;
}

/* Welcome Text */
.welcome-text {
    margin-bottom: 2rem;
}

.welcome-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 0.5rem;
}

.welcome-description {
    color: #64748b;
    font-size: 0.9rem;
}

/* Discord Button */
.discord-btn {
    width: 100%;
    background: linear-gradient(135deg, #5865f2, #4752c4);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(88, 101, 242, 0.4);
}

.discord-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.discord-btn:hover::before {
    left: 100%;
}

.discord-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(88, 101, 242, 0.6);
}

.discord-btn:active {
    transform: translateY(0);
}

.discord-icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Features List */
.features-list {
    margin: 2rem 0;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(99, 102, 241, 0.05);
    border-radius: 10px;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(99, 102, 241, 0.1);
    transform: translateX(5px);
}

.feature-icon {
    width: 20px;
    height: 20px;
    color: #a5b4fc;
    flex-shrink: 0;
}

.feature-text {
    color: #cbd5e1;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Footer */
.footer-text {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(99, 102, 241, 0.2);
    text-align: center;
    color: #64748b;
    font-size: 0.8rem;
}

/* Error Message */
.error-message {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #fca5a5;
    padding: 0.875rem;
    border-radius: 10px;
    margin-top: 1rem;
    font-size: 0.875rem;
    text-align: center;
    display: none;
}

.error-message.show {
    display: block;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Responsive */
@media (max-width: 768px) {
    body {
        overflow-y: auto;
        height: auto;
        min-height: 100vh;
    }

    .login-container {
        padding: 1.5rem 1rem;
        align-items: flex-start;
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    .glass-card {
        padding: 2rem 1.5rem;
        margin: 0;
    }

    .logo {
        width: 80px;
        height: 80px;
        margin-bottom: 1rem;
    }

    .title {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 0.85rem;
    }

    .welcome-title {
        font-size: 1.5rem;
    }

    .welcome-description {
        font-size: 0.85rem;
    }

    .logo-container {
        margin-bottom: 2rem;
    }

    .welcome-text {
        margin-bottom: 1.5rem;
    }

    .feature-item {
        padding: 0.625rem;
        margin-bottom: 0.4rem;
    }

    .feature-text {
        font-size: 0.85rem;
    }

    .feature-icon {
        width: 18px;
        height: 18px;
    }

    .cyber-waves {
        height: 200px;
        opacity: 0.3;
    }

    .grid-background {
        background-size: 30px 30px;
    }

    .hexagon {
        width: 70px;
        height: 70px;
    }
}

@media (max-width: 480px) {
    body {
        overflow-y: auto;
    }

    .login-container {
        padding: 1rem;
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }

    .glass-card {
        padding: 1.5rem 1.25rem;
        border-radius: 20px;
    }

    .logo {
        width: 70px;
        height: 70px;
        margin-bottom: 1rem;
    }

    .logo-container {
        margin-bottom: 1.5rem;
    }

    .title {
        font-size: 1.75rem;
    }

    .subtitle {
        font-size: 0.8rem;
    }

    .welcome-title {
        font-size: 1.35rem;
    }

    .welcome-description {
        font-size: 0.8rem;
        line-height: 1.4;
    }

    .welcome-text {
        margin-bottom: 1.25rem;
    }

    .discord-btn {
        font-size: 0.9rem;
        padding: 0.875rem 1rem;
        gap: 0.5rem;
    }

    .discord-icon {
        width: 20px;
        height: 20px;
    }

    .features-list {
        margin: 1.5rem 0;
    }

    .feature-item {
        padding: 0.5rem;
        margin-bottom: 0.35rem;
        border-radius: 8px;
    }

    .feature-text {
        font-size: 0.8rem;
        line-height: 1.3;
    }

    .feature-icon {
        width: 16px;
        height: 16px;
    }

    .footer-text {
        margin-top: 1.5rem;
        padding-top: 1.25rem;
        font-size: 0.75rem;
    }

    .error-message {
        font-size: 0.8rem;
        padding: 0.75rem;
    }

    .cyber-waves {
        height: 150px;
        opacity: 0.25;
    }

    .grid-background {
        background-size: 25px 25px;
        opacity: 0.8;
    }

    .hexagon {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 360px) {
    .login-container {
        padding: 0.75rem;
        padding-top: 1rem;
        padding-bottom: 1rem;
    }

    .glass-card {
        padding: 1.25rem 1rem;
    }

    .logo {
        width: 60px;
        height: 60px;
    }

    .title {
        font-size: 1.5rem;
    }

    .welcome-title {
        font-size: 1.2rem;
    }

    .feature-item {
        padding: 0.4rem;
        gap: 0.5rem;
    }

    .feature-text {
        font-size: 0.75rem;
    }
}

@media (max-height: 700px) {
    .logo {
        width: 70px;
        height: 70px;
        margin-bottom: 1rem;
    }

    .title {
        font-size: 1.75rem;
    }

    .logo-container {
        margin-bottom: 1.5rem;
    }

    .glass-card {
        padding: 2rem;
    }

    .feature-item {
        padding: 0.5rem;
    }
}

@media (max-height: 700px) and (max-width: 480px) {
    .login-container {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }

    .logo {
        width: 60px;
        height: 60px;
        margin-bottom: 0.75rem;
    }

    .logo-container {
        margin-bottom: 1rem;
    }

    .welcome-text {
        margin-bottom: 1rem;
    }

    .features-list {
        margin: 1rem 0;
    }

    .footer-text {
        margin-top: 1rem;
        padding-top: 1rem;
    }
}

/* Landscape Mobile Optimization */
@media (max-height: 500px) and (orientation: landscape) {
    body {
        overflow-y: auto;
        height: auto;
    }

    .login-container {
        padding: 1rem;
        align-items: flex-start;
    }

    .glass-card {
        padding: 1.5rem;
        margin: 0.5rem 0;
    }

    .logo {
        width: 50px;
        height: 50px;
        margin-bottom: 0.5rem;
    }

    .logo-container {
        margin-bottom: 1rem;
    }

    .title {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 0.75rem;
    }

    .welcome-title {
        font-size: 1.1rem;
    }

    .welcome-description {
        font-size: 0.75rem;
    }

    .welcome-text {
        margin-bottom: 0.75rem;
    }

    .features-list {
        margin: 0.75rem 0;
    }

    .feature-item {
        padding: 0.4rem;
        margin-bottom: 0.25rem;
    }

    .feature-text {
        font-size: 0.75rem;
    }

    .feature-icon {
        width: 14px;
        height: 14px;
    }

    .discord-btn {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }

    .footer-text {
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        font-size: 0.7rem;
    }

    .cyber-waves {
        height: 100px;
        opacity: 0.2;
    }
}

/* Additional Info Section */
.additional-info {
    margin-top: 1.5rem;
    text-align: center;
    max-width: 480px;
}

.copyright {
    color: #64748b;
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}

.disclaimer {
    color: #52525b;
    font-size: 0.7rem;
    margin-bottom: 1rem;
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.4;
}

.tagline {
    background: linear-gradient(135deg, #a5b4fc, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
    font-size: 0.85rem;
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .discord-btn {
        -webkit-tap-highlight-color: transparent;
    }

    .discord-btn:active {
        transform: scale(0.98);
    }

    .feature-item:hover {
        transform: none;
        background: rgba(99, 102, 241, 0.05);
    }

    .feature-item:active {
        background: rgba(99, 102, 241, 0.1);
    }
}
