* {
    box-sizing: border-box;
}

:root {
    --bg-1: #09050d;
    --bg-2: #130814;
    --bg-3: #1e0b1f;
    --glass: rgba(255, 255, 255, 0.07);
    --glass-2: rgba(255, 255, 255, 0.1);
    --border: rgba(255, 255, 255, 0.12);
    --text: #f8effa;
    --muted: rgba(248, 239, 250, 0.72);
    --pink: #ff2a8c;
    --purple: #7a2cff;
    --red: #ff4b6e;
    --green: #2fd08a;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    --radius-xl: 28px;
    --radius-lg: 18px;
    --radius-md: 14px;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(255, 42, 140, 0.15), transparent 28%),
        radial-gradient(circle at bottom right, rgba(122, 44, 255, 0.18), transparent 30%),
        linear-gradient(160deg, var(--bg-1) 0%, var(--bg-2) 45%, var(--bg-3) 100%);
}

body {
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

.bg-blur {
    position: fixed;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.35;
    pointer-events: none;
    z-index: 0;
}

.blur-a {
    width: 240px;
    height: 240px;
    background: var(--pink);
    top: -20px;
    left: -40px;
}

.blur-b {
    width: 280px;
    height: 280px;
    background: var(--purple);
    right: -80px;
    bottom: 0;
}

.grid-overlay {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 26px 26px;
    pointer-events: none;
    z-index: 0;
}

/* PAGE LAYOUTS */

.login-body,
.dashboard-body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(20px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));
}

.auth-shell,
.dashboard-shell {
    width: 100%;
    height: 100dvh;
    max-width: 560px;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: space-between;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.auth-card,
.dashboard-card {
    width: 100%;
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.05));
    border: 1px solid var(--border);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.auth-card {
    padding: 24px 18px;
}

.dashboard-card {
    padding: 20px 16px 18px;
}

/* HEADINGS */

.top-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.brand-title,
.dashboard-title {
    margin: 0 0 10px;
    line-height: 1;
    font-size: clamp(32px, 9vw, 52px);
    font-weight: 800;
    letter-spacing: -1px;
}

.brand-subtitle,
.dashboard-subtitle {
    margin: 0 0 22px;
    color: var(--muted);
    line-height: 1.5;
    font-size: 14px;
}

/* FORMS */

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-wrap label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.84);
}

.input-wrap input {
    width: 100%;
    min-height: 52px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    padding: 14px 14px;
    font-size: 16px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    outline: none;
    transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.input-wrap input::placeholder {
    color: rgba(255, 255, 255, 0.34);
}

.input-wrap input:focus {
    border-color: rgba(255, 42, 140, 0.55);
    box-shadow: 0 0 0 4px rgba(255, 42, 140, 0.12);
    background: rgba(255, 255, 255, 0.09);
}

/* ALERTS */

.error-box,
.success-box,
.empty-box {
    padding: 13px 14px;
    border-radius: var(--radius-md);
    font-size: 14px;
    line-height: 1.45;
}

.error-box {
    background: rgba(255, 75, 110, 0.14);
    border: 1px solid rgba(255, 75, 110, 0.24);
    color: #ffd9e3;
}

.success-box {
    background: rgba(47, 208, 138, 0.12);
    border: 1px solid rgba(47, 208, 138, 0.25);
    color: #d9ffee;
}

.empty-box {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--muted);
}

/* BUTTONS */

.primary-btn,
.secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease;
}

.primary-btn {
    border: none;
    color: #fff;
    background: linear-gradient(135deg, var(--pink), var(--purple));
    box-shadow: 0 14px 36px rgba(122, 44, 255, 0.3);
}

.secondary-btn {
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.small-btn {
    min-height: 42px;
    padding: 10px 14px;
    font-size: 14px;
}

.primary-btn:hover,
.secondary-btn:hover,
.link-card:hover {
    transform: translateY(-1px);
    opacity: 0.96;
}

/* DASHBOARD */

.dashboard-head {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 18px;
}

.card-grid {
    display: grid;
    gap: 14px;
}

.feature-card {
    display: block;
    border-radius: 20px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.feature-card-img {
    width: 100%;
    border-radius: 20px;
    object-fit: cover;
    transition: transform 0.18s ease;
}

.feature-image {
    width: 100% !important;
}

.feature-card-img img {
    width: 20px;
    border-radius: 20px;
    object-fit: cover;
    transition: transform 0.18s ease;
}

.feature-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.12);
}

.link-card {
    color: inherit;
    text-decoration: none;
}

.feature-card h2 {
    margin: 10px 0 8px;
    font-size: 18px;
}

.feature-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
    font-size: 14px;
}

.feature-tag {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #fff;
    background: linear-gradient(135deg, rgba(255, 42, 140, 0.8), rgba(122, 44, 255, 0.8));
}

/* RESPONSIVE */

@media (min-width: 768px) {

    .login-body,
    .dashboard-body {
        padding: 32px;
    }

    .auth-shell,
    .dashboard-shell {
        max-width: 760px;
    }

    .auth-card {
        padding: 34px 30px;
    }

    .dashboard-card {
        padding: 28px;
    }

    .dashboard-head {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }

    .card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .feature-card {
        padding: 20px;
    }
}

* {
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
}

*:focus,
*:active {
    outline: none;
}

.card-wrapper {
    position: relative;
}

.card-notification {
    position: absolute;
    top: 0px;
    right: 0px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ff6b9a, #ff0055);

    box-shadow:
        0 0 6px rgba(255, 0, 85, 0.9),
        0 0 12px rgba(255, 0, 85, 0.7),
        0 0 18px rgba(255, 0, 85, 0.5);

    animation:
        dpPulse 1.6s infinite,
        dpGlow 2.4s infinite alternate;

    z-index: 10;
}

/* heartbeat style */
@keyframes dpPulse {
    0% {
        transform: scale(1);
    }

    20% {
        transform: scale(1.25);
    }

    40% {
        transform: scale(1);
    }

    60% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

/* breathing glow */
@keyframes dpGlow {
    0% {
        box-shadow:
            0 0 6px rgba(255, 0, 85, 0.7),
            0 0 10px rgba(255, 0, 85, 0.5);
    }

    100% {
        box-shadow:
            0 0 10px rgba(255, 0, 85, 1),
            0 0 18px rgba(255, 0, 85, 0.9),
            0 0 28px rgba(255, 0, 85, 0.6);
    }
}



/* Reset de bază pentru layout full screen */
html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
    /* body nu mai face scroll */
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

.dashboard-body {
    min-height: 100vh;
    height: 100vh;
    overflow: hidden;
}

/* Containerul principal ocupă tot ecranul */
.dashboard-shell {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    height: 100vh;
    padding: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header fix în interiorul paginii */
.dashboard-header {
    flex: 0 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

/* Cardul mare ocupă spațiul rămas */
.dashboard-card {
    flex: 1 1 auto;
    min-height: 0;
    /* foarte important pentru scroll intern */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
}

/* Headerul din card rămâne sus */
.dashboard-head {
    flex: 0 0 auto;
    margin-bottom: 16px;
}

/* Doar această zonă face scroll */
.games-scroll-area {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
    padding-right: 4px;
    padding-bottom: 5rem;
    -webkit-overflow-scrolling: touch;
}

/* Grid responsive real */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    width: 100%;
    max-width: 100%;
    align-content: start;
}

/* Cardurile nu mai sparg layoutul */
.card-grid {
    width: 100%;
    min-width: 0;
}

/* Link/card responsive */
.feature-card-img,
.link-card,
.card-wrapper {
    display: block;
    width: 100%;
    max-width: 100%;
    position: relative;
}

/* Imaginile se scalează corect */
.feature-image {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    border-radius: 18px;
    object-fit: cover;
}

/* Notificarea rămâne poziționată corect */
.card-notification {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    z-index: 2;
}

/* Tablete */
@media (max-width: 1024px) {
    .dashboard-shell {
        padding: 14px;
    }

    .games-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 14px;
    }
}

/* Telefoane */
@media (max-width: 768px) {
    .dashboard-shell {
        padding: 12px;
    }

    .dashboard-header {
        gap: 10px;
    }

    .games-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* Telefoane mici */
@media (max-width: 480px) {
    .dashboard-shell {
        padding: 10px;
    }

    .dashboard-head {
        margin-bottom: 12px;
    }

    .games-scroll-area {
        padding-right: 2px;
    }

    .feature-image {
        border-radius: 14px;
    }
}


.games-scroll-area {
    overflow-y: auto;
}


/* Ascunde scrollbar-ul dar păstrează scroll-ul */
.games-scroll-area {
    -ms-overflow-style: none;
    /* IE + Edge vechi */
    scrollbar-width: none;
    /* Firefox */
}

.games-scroll-area::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}