/* =========================
   RESET & BASE
   ========================= */

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

body {
    font-family: "Inter", sans-serif;
    background: radial-gradient(circle at top, #1a1a1a 0%, #0d0d0d 100%);
    color: #e0e0e0;
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* =========================
   LAYOUT
   ========================= */

.main {
    padding: 2.5rem 1.5rem 4rem;
}

/* =========================
   HEADER
   ========================= */

.header {
    position: sticky;
    top: 0;
    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0.7rem 2rem;
    background: linear-gradient(90deg, #161616, #1f1f1f);
    border-bottom: 1px solid #ff6600;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.45);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-right {
    display: flex;
    align-items: center;
}

.logo {
    height: 48px;
}

/* Avatar container (used when user is logged in) */
.avatar-container {
    position: relative;
    display: inline-block;
}

.avatar-img {
    width: 38px;      /* tweak smaller if you want, e.g. 32px */
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
}

/* Dropdown hidden by default */
.avatar-dropdown {
    position: absolute;
    top: 45px;
    right: -20px;
    z-index: 100;

    display: none;
    min-width: 160px;
    padding: 0.8rem 1rem;
    text-align: center;

    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);

    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);

    opacity: 0;
    transform: translateY(-10px);
    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
}

/* Show dropdown smoothly on hover */
.avatar-container:hover .avatar-dropdown {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Dropdown username styling */
.avatar-dropdown p {
    margin-bottom: 0.6rem;
    font-weight: 600;
    font-size: 1rem;
}

/* Logout button styling */
.avatar-dropdown button {
    width: 100%;
    padding: 0.45rem 0.8rem;

    border: none;
    border-radius: 10px;
    cursor: pointer;

    font-weight: 600;
    font-size: 0.95rem;

    color: #fff;
    background: rgba(255, 102, 0, 0.8);

    backdrop-filter: blur(5px);
    transition:
        background 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.avatar-dropdown button:hover {
    background: #ff7a1a;
    transform: translateY(-1px);
    box-shadow: 0 1px 25px rgba(255, 102, 0, 0.35);
}


/* =========================
   BUTTONS
   ========================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;

    padding: 0.55rem 1.3rem;
    border-radius: 8px;
    border: none;

    font-size: 1rem;
    font-weight: 600;

    cursor: pointer;
    transition:
        background 0.25s ease,
        transform 0.25s cubic-bezier(0.2, 0.8, 0.4, 1),
        box-shadow 0.25s ease;
}

.btn-primary {
    background: #ff6600;
    color: #fff;
}

.btn-primary:hover {
    background: #ff7a1a;
    transform: translateY(-1px);
    box-shadow: 0 1px 25px rgba(255, 102, 0, 0.35);
}

.btn-disabled {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.4);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Service buttons (inherit from .btn) */

.service-btn {
    margin-top: 1rem;
}

/* Preserve ID for JS hooks, but style via classes */
#login-button {
    /* no extra styles, it already uses .btn & .btn-primary */
}

/* =========================
   MODAL
   ========================= */

/* Backdrop */
.modal {
    position: fixed;
    inset: 0;
    z-index: 2000;

    display: flex;
    justify-content: center;
    align-items: center;

    opacity: 0;
    pointer-events: none;

    background: rgba(0, 0, 0, 0.65);
    transition: opacity 0.35s ease;

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

/* When active (JS adds this class) */
.modal.active {
    opacity: 1;
    pointer-events: all;
}

/* Modal card */
.glass-card {
    padding: 2.5rem 3rem;
    text-align: center;

    background: rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.45);

    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);

    opacity: 0;
    transform: scale(0.85);
    transition:
        opacity 0.35s ease,
        transform 0.35s ease;
}

.modal.active .glass-card {
    opacity: 1;
    transform: scale(1);
}

.modal-logo {
    width: 95px;
    margin-bottom: 1.2rem;
}

.modal-title {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

/* Discord login button */
.discord-login {
    width: 100%;
    padding: 0.8rem 1.4rem;

    border-radius: 10px;
    border: none;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    font-size: 1.1rem;
    font-weight: 600;

    color: #fff;
    background: #5865f2;
    transition:
        transform 0.25s cubic-bezier(0.2, 0.8, 0.4, 1),
        box-shadow 0.25s ease;
}

.discord-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 1px 15px rgba(86, 97, 221, 0.5);
}

.discord-login img {
    width: 22px;
    filter: brightness(0) invert(1);
}

/* =========================
   SERVICES SECTION
   ========================= */

.services-section {
    max-width: 1200px;
    margin: 0 auto;
}

.service-title {
    margin-bottom: 2.4rem;

    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.08em;
    text-transform: uppercase;

    /* Animated gradient text */
    background: linear-gradient(
        90deg,
        #ff6600,
        #ffffff,
        #ff6600,
        #ffffff,
        #ff6600
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;

    animation: gradientSlide 5s linear infinite;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;

    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    padding: 1.8rem 1.4rem 1.9rem;
    text-align: center;

    background: rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45);

    backdrop-filter: blur(14px);
    transition:
        transform 0.25s cubic-bezier(0.2, 0.8, 0.4, 1),
        box-shadow 0.25s ease,
        border-color 0.25s ease,
        background 0.25s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.6);
    border-color: #ff6600;
    background: rgba(255, 255, 255, 0.09);
}

.service-icon {
    margin-bottom: 1rem;
}

.service-icon img {
    display: block;
    width: 64px;
    height: 64px;
    margin: 0 auto;
    object-fit: contain;
}

.service-name {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #ffffff;
}

/* =========================
   ANIMATIONS
   ========================= */

@keyframes gradientSlide {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 900px) {
    .header {
        padding: 0.7rem 1.25rem;
    }
}

@media (max-width: 600px) {
    .main {
        padding: 2rem 1rem 3rem;
    }

    .glass-card {
        width: 90%;
        padding: 2rem 1.75rem;
    }
}