.app-screen {
    position: absolute;
    inset: 0;

    overflow-x: hidden;
    overflow-y: auto;

    display: flex;
    flex-direction: column;

    color: white;
    font-family: "Inter", sans-serif;

    background-color: #09103f;
    background-image: url("/client/assets/images/bg/home_bg_portrait.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

@media (orientation: landscape) {
    .app-screen {
        background-image: url("/client/assets/images/bg/home_bg_landscape.jpg");
    }
}

/* =========================================================
   TOPBAR
========================================================= */

.app-topbar {
    font-family: "Sora", sans-serif;

    position: relative;
    z-index: 10000;

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

    gap: 14px;

    padding: 14px 16px;
    margin: 10px 10px 18px;

    border-radius: 20px;

    background: rgba(255, 255, 255, 0.06);

    border: 1px solid rgba(255, 255, 255, 0.05);

    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

/* =========================================================
   LOGO
========================================================= */

.app-logo {
    margin: 0;

    font-size: 1.2rem;
    font-weight: 900;

    letter-spacing: 2px;

    color: #ecfeff;

    text-shadow: 0 0 20px rgba(6, 182, 212, 0.45);
}

/* =========================================================
   CONTROLS
========================================================= */

.app-controls {
    font-family: "Inter", sans-serif;

    display: flex;
    align-items: center;

    gap: 10px;
}

/* =========================================================
   PROFILE MINI
========================================================= */

.home-profile-mini {
    width: 44px;
    height: 44px;
    cursor: pointer;
    border-radius: 50%;

    overflow: hidden;

    flex-shrink: 0;

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

    background: linear-gradient(135deg, #06b6d4, #14b8a6);

    border: 2px solid rgba(255, 255, 255, 0.12);

    box-shadow: 0 6px 18px rgba(6, 182, 212, 0.28);

    font-weight: 900;

    color: white;

    font-size: 1rem;
}

.home-profile-mini-image {
    width: 100%;
    height: 100%;

    object-fit: cover;
}

.home-profile-mini-letter {
    font-family: "Sora", sans-serif;
}

/* =========================================================
   CUSTOM ROLE DROPDOWN
========================================================= */

.role-dropdown-wrapper {
    position: relative;
}

.role-dropdown-btn {
    font-family: "Inter", sans-serif;

    height: 46px;
    min-width: 145px;

    padding: 0 16px;

    border: none;
    outline: none;

    border-radius: 14px;

    background: linear-gradient(135deg, #0891b2, #14b8a6);

    color: white;

    font-size: 0.92rem;
    font-weight: 800;

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

    gap: 12px;

    cursor: pointer;

    box-shadow: 0 8px 22px rgba(6, 182, 212, 0.28);

    transition:
        transform 0.12s ease,
        opacity 0.12s ease,
        box-shadow 0.2s ease;
}

.role-dropdown-btn:hover {
    transform: translateY(-2px);

    box-shadow: 0 12px 28px rgba(6, 182, 212, 0.38);
}

.role-dropdown-btn:active {
    transform: scale(0.94);
}

.role-dropdown-arrow {
    font-size: 0.7rem;
    opacity: 0.85;
}

/* =========================================================
   DROPDOWN MENU
========================================================= */

.role-dropdown-menu {
    position: absolute;

    top: calc(100% + 10px);
    right: 0;

    width: 100%;

    display: flex;
    flex-direction: column;

    gap: 8px;

    padding: 10px;

    border-radius: 18px;

    background: rgba(8, 105, 45, 0.98);

    border: 1px solid rgba(255, 255, 255, 0.06);

    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);

    backdrop-filter: blur(12px);

    opacity: 0;
    visibility: hidden;

    pointer-events: none;

    transform: translateY(-10px) scale(0.96);

    transition:
        opacity 0.18s ease,
        transform 0.18s ease,
        visibility 0.18s ease;

    z-index: 999;
}

.role-dropdown-menu.show {
    opacity: 1;
    visibility: visible;

    pointer-events: auto;

    transform: translateY(0) scale(1);
}

/* =========================================================
   ROLE OPTION
========================================================= */

.role-option {
    height: 44px;

    border: none;

    border-radius: 12px;

    background: rgba(255, 255, 255, 0.04);

    color: white;

    font-family: "Inter", sans-serif;

    font-size: 0.9rem;
    font-weight: 700;

    cursor: pointer;

    transition:
        transform 0.12s ease,
        background 0.18s ease;
}

.role-option:hover {
    background: rgba(6, 182, 212, 0.22);
}

.role-option:active {
    transform: scale(0.96);
}

.role-option.active {
    background: linear-gradient(135deg, #06b6d4, #14b8a6);
}

/* =========================================================
   CONTENT
========================================================= */

.app-content {
    position: relative;
    z-index: 2;

    flex: 1;

    width: 100%;
    max-width: 100vw;

    overflow-x: hidden;
}

/* =========================================================
   WELCOME TEXT
========================================================= */

.welcome-text {
    font-family: "Orbitron", sans-serif;

    margin: 0 18px 22px;

    font-size: clamp(2rem, 5vw, 3.2rem);

    font-weight: 900;

    line-height: 1;

    color: white;

    text-shadow: 0 0 24px rgba(6, 182, 212, 0.35);

    animation: titleFloat 2.5s ease-in-out infinite;
}

/* =========================================================
   GRID
========================================================= */

.home-grid {
    display: grid;

    width: 100vw;

    position: relative;

    left: 50%;
    transform: translateX(-50%);

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 10px;

    padding: 0 10px 20px;
}

/* =========================================================
   HOME CARDS
========================================================= */

.home-card {
    position: relative;

    overflow: hidden;

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

    min-height: 84px;

    padding: 14px 10px;

    border-radius: 20px;

    text-align: center;

    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.25;

    color: white;

    cursor: pointer;

    user-select: none;

    border: 1px solid rgba(255, 255, 255, 0.06);

    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);

    transition:
        transform 0.14s ease,
        opacity 0.14s ease;
}

/* Subtle top glow */

.home-card::before {
    content: "";

    position: absolute;
    inset: 0;

    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.1),
        transparent 40%
    );

    pointer-events: none;
}

.home-card:hover {
    transform: translateY(-2px);
}

.home-card:active {
    transform: scale(0.96);
    opacity: 0.9;
}

/* =========================================================
   CARD COLOR VARIANTS
========================================================= */

#takeTestBtn {
    background: linear-gradient(145deg, #06b6d4, #0284c7);
}

#gameModeBtn {
    background: linear-gradient(145deg, #14b8a6, #0f766e);
}

#resumeTestBtn {
    background: linear-gradient(145deg, #0ea5e9, #0369a1);
}

#notificationsBtn {
    background: linear-gradient(145deg, #10b981, #047857);
}

#profileBtn {
    background: linear-gradient(145deg, #3b82f6, #1d4ed8);
}

#optionsBtn {
    background: linear-gradient(145deg, #2563eb, #1e40af);
}

#keyPointsBtn {
    background: linear-gradient(145deg, #22c55e, #15803d);
}

#dashboardBtn {
    background: linear-gradient(145deg, #06b6d4, #0f766e);
}

/* =========================================================
   NOTIFICATION DOT
========================================================= */

.notif-dot {
    position: absolute;

    top: 14px;
    right: 14px;

    width: 12px;
    height: 12px;

    border-radius: 50%;

    background: #ff4d4d;

    box-shadow: 0 0 0 rgba(255, 77, 77, 0.6);
}

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

.modal-overlay {
    font-family: "Inter", sans-serif;

    position: fixed;
    inset: 0;

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

    padding: 20px;

    background: rgba(2, 6, 23, 0.72);

    backdrop-filter: blur(5px);

    z-index: 999;
}

.hidden {
    display: none;
}

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

.modal-box {
    width: 100%;
    max-width: 400px;

    padding: 30px;

    border-radius: 30px;

    background: linear-gradient(145deg, #082f49, #0f172a);

    border: 1px solid rgba(255, 255, 255, 0.08);

    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);

    animation: modalIn 0.3s ease;
}

.modal-box h3 {
    font-family: "Sora", sans-serif;

    margin-top: 0;
    margin-bottom: 24px;

    text-align: center;

    font-size: 1.4rem;
    font-weight: 900;

    color: white;
}

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

.modal-options {
    display: flex;
    flex-direction: column;

    gap: 14px;
}

.modal-btn {
    font-family: "Inter", sans-serif;

    height: 58px;

    border: none;

    border-radius: 18px;

    font-size: 1rem;

    color: white;

    cursor: pointer;

    background: linear-gradient(135deg, #06b6d4, #14b8a6);

    box-shadow: 0 10px 24px rgba(6, 182, 212, 0.25);

    transition:
        transform 0.12s ease,
        opacity 0.12s ease;
}

.modal-btn:hover {
    transform: translateY(-3px);

    box-shadow: 0 14px 30px rgba(20, 184, 166, 0.34);
}

.modal-btn:active {
    transform: scale(0.94);
}

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

@keyframes titleFloat {
    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-4px);
    }
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.82) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {
    .app-topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .app-controls {
        width: 100%;
    }

    .role-dropdown-wrapper {
        flex: 1;
    }

    .role-dropdown-btn {
        width: 100%;
    }

    .home-card {
        min-height: 110px;
    }
}

/* =========================================================
   SMALL PHONES
========================================================= */

@media (max-width: 480px) {
    .welcome-text {
        font-size: 1.7rem;

        margin: 0 12px 18px;
    }

    .home-grid {
        gap: 8px;

        padding: 0 8px 16px;
    }

    .home-card {
        min-height: 78px;

        padding: 12px 8px;

        font-size: 0.85rem;

        border-radius: 18px;
    }

    .app-topbar {
        margin: 8px 8px 14px;

        padding: 12px;
    }
}
