/* assets/style.css - Transparent & Centered with Fixed Navbar */
:root {
    --primary: #8b5cf6;
    --secondary: #00c6ff;
    --accent: #ff0080;
    --text-main: #ffffff;
    --text-muted: #e2e8f0;
    --glass-border: rgba(255, 255, 255, 0.1);
    --error: #ef4444;
    --success: #22c55e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'IBM Plex Sans Thai', sans-serif;
}

body {
    color: var(--text-main);
    overflow-x: hidden;
    background-color: #050505;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('background.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    filter: blur(3px);
    z-index: -1;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    z-index: -1;
}

/* Typography & shadows */
h1,
h2,
h3,
p,
span,
div {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Apply Animations */
.hero-content {
    animation: fadeInUp 1s ease-out;
}

.feature-card {
    animation: fadeInUp 0.8s ease-out backwards;
}

.feature-card:nth-child(1) {
    animation-delay: 0.1s;
}

.feature-card:nth-child(2) {
    animation-delay: 0.2s;
}

.feature-card:nth-child(3) {
    animation-delay: 0.3s;
}

.feature-card:nth-child(4) {
    animation-delay: 0.4s;
}

.feature-card:nth-child(5) {
    animation-delay: 0.5s;
}

.feature-card:nth-child(6) {
    animation-delay: 0.6s;
}

/* Error Toast */
.error-toast {
    position: fixed;
    top: 100px;
    right: 20px;
    background: rgba(239, 68, 68, 0.95);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 2000;
    animation: slideIn 0.3s ease-out;
    box-shadow: 0 10px 40px rgba(239, 68, 68, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 400px;
}

.error-toast i {
    font-size: 1.2rem;
}

.toast-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    margin-left: 10px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.toast-close:hover {
    opacity: 1;
}

/* Error Message Box */
.error-message {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid var(--error);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 1rem 0;
    animation: fadeInUp 0.3s ease-out;
}

.error-message i {
    color: var(--error);
}

/* Navbar - Clean & White */
.navbar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem 2rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.nav-container {
    /* Virtual container logic maintained via flex centering */
}

/* Logo - White & Clean */
.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-right: auto;
    /* Push center links */
    background: none;
    -webkit-text-fill-color: initial;
    position: absolute;
    left: 2rem;
}

/* Nav Links - White Glass Pill */
.nav-links {
    display: flex;
    gap: 2.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.8rem 2.5rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.nav-links a {
    color: rgba(255, 255, 255, 0.95);
    /* Bright White */
    font-weight: 500;
    font-size: 1.05rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    transition: 0.3s;
    text-decoration: none;
}

.nav-links a:hover {
    color: white;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
}

/* Auth Section */
.auth-buttons {
    margin-left: auto;
    display: flex;
    align-items: center;
    position: absolute;
    right: 2rem;
}

.user-profile {
    background: rgba(0, 0, 0, 0.4);
    padding: 5px 15px 5px 5px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    object-fit: cover;
}

/* Login Button - White & Clean */
.btn-login {
    background: white;
    color: var(--primary);
    padding: 0.6rem 1.6rem;
    border-radius: 30px;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-shadow: none !important;
    /* Fixed shadow issue */
}

.btn-login:hover {
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    background: white;
    color: var(--accent);
}

.server-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 0.85rem;
    margin-right: 12px;
    transition: all 0.2s;
    color: white;
    text-decoration: none;
}

.server-pill:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.server-pill img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 2rem;
}

.hero h1 {
    font-size: 5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 900;
    animation: float 6s ease-in-out infinite;
}

.hero-highlight {
    background: linear-gradient(45deg, var(--secondary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
    filter: drop-shadow(0 0 20px rgba(255, 0, 128, 0.5));
    display: inline-block;
}

.hero p {
    font-size: 1.4rem;
    margin-bottom: 2.5rem;
    color: var(--text-muted);
    font-weight: 300;
}

/* Buttons */
.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary), var(--accent));
    padding: 1rem 3rem;
    border-radius: 50px;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 30px var(--accent);
}

.btn-secondary {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 1rem 3rem;
    border-radius: 50px;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    text-decoration: none;
    transition: 0.3s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

/* Features */
.features {
    padding: 6rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    transition: all 0.4s;
    backdrop-filter: blur(5px);
}

.feature-card:hover {
    background: rgba(0, 0, 0, 0.4);
    transform: translateY(-10px) scale(1.02);
    border-color: var(--secondary);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--secondary);
    filter: drop-shadow(0 0 10px var(--secondary));
    animation: float 4s ease-in-out infinite;
}

.feature-card:nth-child(even) .feature-icon {
    animation-delay: 1s;
    color: var(--accent);
    filter: drop-shadow(0 0 10px var(--accent));
}

/* Stats */
.stats-section {
    padding: 6rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.stats-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 3rem;
    border-radius: 30px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.benefit-list {
    list-style: none;
    margin-top: 2rem;
}

.benefit-list li {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 15px;
}

.check-icon {
    color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.stats-image {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    position: relative;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(15px);
}

/* Server Selection Page */
.select-server-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 100px 2rem 2rem;
}

.select-header {
    text-align: center;
    margin-bottom: 3rem;
}

.select-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.select-header p {
    color: var(--text-muted);
}

.select-icon {
    font-size: 4rem;
    color: var(--secondary);
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 20px var(--secondary));
}

.server-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    max-width: 900px;
    width: 100%;
}

.server-card-form {
    display: contents;
}

.server-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    min-width: 280px;
    position: relative;
    overflow: hidden;
    color: white;
    font-family: inherit;
    text-align: left;
}

.server-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 20px var(--accent);
}

.server-card-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.server-card:hover .server-card-glow {
    opacity: 0.1;
}

.server-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.server-icon-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-shadow: none;
}

.server-info {
    flex: 1;
    min-width: 0;
}

.server-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.server-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: var(--success);
    text-shadow: none;
}

.server-badge i {
    font-size: 0.7rem;
}

.server-arrow {
    color: var(--text-muted);
    transition: transform 0.3s, color 0.3s;
}

.server-card:hover .server-arrow {
    transform: translateX(5px);
    color: var(--accent);
}

/* No Servers State */
.no-servers {
    text-align: center;
    padding: 3rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    max-width: 400px;
}

.no-servers-icon {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    animation: float 3s ease-in-out infinite;
}

.no-servers h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.no-servers p {
    color: var(--text-muted);
}

.back-link {
    margin-top: 2rem;
    color: var(--text-muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s;
}

.back-link:hover {
    color: white;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    border-top: 1px solid var(--glass-border);
    margin-top: 2rem;
}

/* Responsive - Tablet */
@media (max-width: 992px) {
    .navbar {
        padding: 1rem 1.5rem;
    }

    .nav-links {
        gap: 1.5rem;
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }

    .hero h1 {
        font-size: 3.5rem;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .navbar {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        gap: 15px;
        background: rgba(10, 10, 20, 0.95);
        backdrop-filter: blur(20px);
        padding: 0.8rem 1rem;
        position: fixed;
        z-index: 1000;
        align-items: center;
    }

    .logo {
        position: static;
        font-size: 1.3rem;
        order: 1;
        margin: 0;
        left: auto;
    }

    .auth-buttons {
        position: static;
        order: 2;
        margin: 0;
        right: auto;
        justify-self: end;
    }

    .nav-links {
        position: static;
        transform: none;
        margin: 0;
        gap: 0.5rem;
        padding: 0;
        order: 3;
        grid-column: 1 / -1;
        font-size: 0.85rem;
        background: transparent;
        border: none;
        box-shadow: none;
        backdrop-filter: none;
        justify-content: space-between;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .nav-links a {
        font-size: 0.9rem;
        padding: 6px 12px;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 20px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        text-shadow: none;
    }

    .btn-login {
        padding: 0.4rem 1rem;
        font-size: 0.85rem;
    }

    .user-profile {
        padding: 4px;
        background: transparent;
        border: none;
        backdrop-filter: none;
    }

    .user-profile span {
        display: none;
    }

    .user-avatar {
        width: 36px;
        height: 36px;
        border-width: 1px;
    }

    /* Hero Section Mobile */
    .hero {
        padding: 0 1.5rem;
        padding-top: 140px;
        /* Reduced from 180px */
        min-height: auto;
        padding-bottom: 4rem;
    }

    .hero h1 {
        font-size: 2.2rem;
        /* Slighly larger */
        line-height: 1.2;
        margin-bottom: 1rem;
        animation: none;
        word-wrap: break-word;
        /* Prevent overflow */
    }

    .hero-highlight {
        display: inline-block;
    }

    .hero p {
        font-size: 1rem;
        margin-bottom: 2rem;
        line-height: 1.6;
        padding: 0 10px;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 0.8rem;
        width: 100%;
        padding: 0 1rem;
    }

    .btn-primary,
    .btn-secondary {
        padding: 1rem 1.5rem;
        /* Larger touch target */
        font-size: 1rem;
        width: 100%;
        justify-content: center;
        border-radius: 14px;
    }

    /* Features Mobile */
    .features {
        padding: 3rem 1rem;
    }

    .section-title h2 {
        font-size: 1.8rem;
    }

    .section-title p {
        font-size: 0.95rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .feature-card {
        padding: 1.5rem;
        border-radius: 16px;
    }

    .feature-icon {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .feature-card h3 {
        font-size: 1.2rem;
    }

    /* Stats Mobile */
    .stats-section {
        padding: 3rem 1rem;
    }

    .stats-container {
        flex-direction: column;
        padding: 1.5rem;
        border-radius: 20px;
        gap: 2rem;
    }

    .benefit-list li {
        font-size: 1rem;
    }

    /* Server Selection Mobile */
    .select-server-page {
        padding: 120px 1rem 1rem;
    }

    .server-card {
        min-width: 100%;
    }

    .error-toast {
        top: auto;
        bottom: 20px;
        left: 15px;
        right: 15px;
        max-width: none;
        border-radius: 14px;
    }

    .server-pill {
        display: none;
    }

    footer {
        padding: 2rem 1rem;
    }
}

/* Responsive - Small Mobile */
@media (max-width: 380px) {
    .nav-links a {
        font-size: 0.8rem;
        padding: 4px 10px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .btn-primary,
    .btn-secondary {
        font-size: 0.9rem;
    }
}