/* Custom styles for MEERA 567 Mobile Web App */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

body {
    font-family: 'Outfit', sans-serif;
    background-color: #fef0f0eb;
    color: #111111;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

/* Custom scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #fef0f0eb;
}

::-webkit-scrollbar-thumb {
    background: #0a5f62;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0D7377;
}

/* App Mock Frame styling for desktop */
.app-container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: #fef0f0eb;
    box-shadow: 0 10px 25px -5px rgba(255, 95, 162, 0.1), 0 8px 10px -6px rgba(255, 95, 162, 0.05);
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Custom Gradient Button */
.btn-primary-gradient {
    background: linear-gradient(135deg, #0D7377 0%, #0a5f62 100%);
    color: #fef0f0eb;
    transition: all 0.2s ease-in-out;
}

.btn-primary-gradient:hover {
    opacity: 0.95;
    box-shadow: 0 4px 12px rgba(255, 45, 122, 0.3);
}

.btn-primary-gradient:active {
    transform: scale(0.98);
}

/* Structural Layout Helpers to bypass CSS compilation issues */
.flex-row-custom {
    display: flex;
    flex-direction: row !important;
    justify-content: space-around !important;
    align-items: center !important;
}

.grid-4-custom {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 12px !important;
}

.bottom-nav-custom {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: #ffffff !important;
    border-top: 2px solid #0a5f62 !important;
    border-top-left-radius: 20px !important;
    border-top-right-radius: 20px !important;
    padding: 6px 10px 8px 10px !important;
    display: flex !important;
    justify-content: space-around !important;
    align-items: flex-end !important;
    z-index: 50 !important;
    max-width: 480px !important;
    margin: 0 auto !important;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.12) !important;
    height: 64px !important;
}

.nav-home-raised {
    position: relative !important;
    top: -20px !important;
    width: 56px !important;
    height: 56px !important;
    background: linear-gradient(135deg, #0D7377 0%, #0a5f62 100%) !important;
    border-radius: 50% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 6px 12px rgba(255, 45, 122, 0.3) !important;
    border: 3.5px solid #ffffff !important;
    transition: transform 0.2s ease-in-out !important;
    z-index: 55 !important;
    text-decoration: none !important;
}

.nav-home-raised:active {
    transform: scale(0.9) !important;
}

.nav-home-raised i {
    color: #ffffff !important;
    font-size: 1.25rem !important;
}

.nav-home-raised span {
    color: #ffffff !important;
    font-size: 8px !important;
    font-weight: 800 !important;
    margin-top: 1px !important;
    text-transform: uppercase !important;
}

.nav-item-custom {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    color: #0a5f62 !important;
    font-size: 9px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    transition: color 0.2s !important;
    flex-grow: 1 !important;
    text-align: center;
    padding-bottom: 2px !important;
}

.nav-item-custom:hover,
.nav-item-active {
    color: #0D7377 !important;
}

.nav-item-custom i {
    font-size: 1.25rem !important;
    margin-bottom: 2px !important;
}

.game-card-custom {
    /* Rules removed as we now use Tailwind utility classes on the card */
}

.result-badge-custom {
    font-size: 1.25rem !important;
    font-weight: 900 !important;
    color: #0D7377 !important;
    background-color: rgba(254, 240, 240, 0.8) !important;
    padding: 10px 20px !important;
    border-radius: 12px !important;
    border: 1px solid rgba(255, 95, 162, 0.15) !important;
    display: inline-block !important;
}

.nav-home-curve {
    position: absolute !important;
    top: -24px !important;
    width: 66px !important;
    height: 66px !important;
    background: #ffffff !important;
    border-radius: 50% !important;
    border-top: 2px solid #0a5f62 !important;
    z-index: 48 !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.35;
    }
}

.animate-blink {
    animation: blink 1.2s infinite ease-in-out;
}

@keyframes playWiggle {

    0%,
    100% {
        transform: rotate(0deg) scale(1);
    }

    20% {
        transform: rotate(4deg) scale(1.03);
    }

    40% {
        transform: rotate(-4deg) scale(0.97);
    }

    60% {
        transform: rotate(3deg) scale(1.02);
    }

    80% {
        transform: rotate(-3deg) scale(0.98);
    }
}

.animate-play-wiggle {
    animation: playWiggle 2.2s infinite ease-in-out;
}

@keyframes cardShake {

    0%,
    100% {
        transform: translateX(0);
    }

    20%,
    60% {
        transform: translateX(-6px);
    }

    40%,
    80% {
        transform: translateX(6px);
    }
}

.shake-card {
    animation: cardShake 0.4s ease-in-out;
}

/* =============================================
   AUTH PAGES  (check_user / login / register)
   ============================================= */

:root {
    --auth-primary: #0D7377;
    --auth-primary-dark: #0a5f62;
}

.auth-body {
    background: #d9d9d9;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
}

.auth-wrapper {
    width: 100%;
    max-width: 420px;
    min-height: 100vh;
    background: #ebebeb;
    display: flex;
    flex-direction: column;
    padding: 28px 20px 20px;
    position: relative;
}

/* Header row: title + icon box */
.auth-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 2px;
}

.auth-page-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--auth-primary);
    line-height: 1.2;
}

.auth-icon-box {
    width: 36px;
    height: 36px;
    border: 2px solid var(--auth-primary);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--auth-primary);
    font-size: 15px;
    flex-shrink: 0;
}

.auth-subtitle {
    font-size: 12px;
    color: #777;
    margin-top: 3px;
    margin-bottom: 20px;
    font-weight: 400;
}

/* Input group */
.auth-input-group {
    position: relative;
    margin-bottom: 10px;
}

.auth-input-group input {
    width: 100%;
    padding: 9px 42px 11px 18px;
    border: 1.5px solid #d0d0d0;
    border-radius: 50px;
    font-size: 13px;
    color: #333;
    outline: none;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: 'Outfit', sans-serif;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.auth-input-group input:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 2px rgba(13, 115, 119, 0.1);
}

.auth-input-group input[readonly] {
    background: #f4f4f4;
    color: #888;
    cursor: not-allowed;
}

.auth-input-group input::placeholder {
    color: #aaa;
    font-size: 12px;
}

.auth-input-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--auth-primary);
    font-size: 14px;
    pointer-events: none;
}

.auth-input-icon.toggle {
    pointer-events: all;
    cursor: pointer;
    color: #999;
}

.auth-input-icon.toggle:hover {
    color: #555;
}

/* Buttons */
.auth-btn {
    width: 100%;
    padding: 9px;
    background: var(--auth-primary);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.3px;
    transition: background 0.2s, box-shadow 0.2s;
    font-family: 'Outfit', sans-serif;
    margin-bottom: 10px;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(13, 115, 119, 0.18);
}

.auth-btn:hover {
    background: var(--auth-primary-dark);
    box-shadow: 0 3px 10px rgba(13, 115, 119, 0.28);
}

.auth-btn:last-child {
    margin-bottom: 0;
}

/* OR divider */
.auth-or-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 2px 0 10px;
    color: #aaa;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.auth-or-divider::before,
.auth-or-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #c8c8c8;
}

/* Forgot password */
.auth-forgot {
    text-align: right;
    margin-bottom: 12px;
}

.auth-forgot a {
    font-size: 12px;
    font-weight: 600;
    color: var(--auth-primary);
    text-decoration: none;
}

.auth-forgot a:hover {
    text-decoration: underline;
}

/* Back link */
.auth-back-link {
    text-align: center;
    margin-top: auto;
    padding-top: 16px;
}

.auth-back-link a {
    font-size: 12px;
    font-weight: 700;
    color: var(--auth-primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.auth-back-link a:hover {
    text-decoration: underline;
}

/* Footer note */
.auth-footer-note {
    text-align: center;
    font-size: 11px;
    color: #bbb;
    margin-top: auto;
    padding-top: 16px;
}

/* =============================================
   APP HEADER (Navbar)
   ============================================= */

.app-header {
    background: #0D7377;
    padding: 0 10px;
    min-height: 48px;
    padding-top: 6px;
    padding-bottom: 6px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.app-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.app-header-menu-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.app-header-menu-btn i {
    font-size: 20px;
}

.app-header-logo img {
    height: 36px;
    max-width: 150px;
    object-fit: contain;
    background: #fff;
    border-radius: 6px;
    padding: 3px 6px;
}

.wallet-icon-btn {
    width: 28px;
    height: 28px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0D7377;
    font-size: 14px;
    text-decoration: none;
    transition: opacity 0.2s;
}

.wallet-icon-btn:hover {
    opacity: 0.8;
}

.notification-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    text-decoration: none;
    transition: opacity 0.2s;
    margin-left: 2px;
}

.notification-icon-btn:hover {
    opacity: 0.8;
}

.app-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.app-header-balance {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.2;
}

.app-header-balance-amount {
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    font-family: 'Outfit', sans-serif;
}

.app-header-balance-label {
    font-size: 9px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    font-family: 'Outfit', sans-serif;
}

.app-header-icon-btn {
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    text-decoration: none;
    transition: background 0.2s;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
}

.app-header-icon-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.app-header-marquee {
    background-color: #0D7377;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0px 0;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    display: flex;
    align-items: center;
    margin-top: 6px;
}

/* =============================================
   APP BOTTOM NAV (Footer)
   ============================================= */

.app-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: #fff;
    border-radius: 20px 20px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 12px 10px 14px;
    z-index: 50;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
    height: 68px;
}

.app-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: #4b5563;
    font-size: 11.5px;
    font-weight: 700;
    text-decoration: none;
    min-width: 52px;
    font-family: 'Outfit', sans-serif;
    transition: color 0.2s;
}

.app-nav-item i,
.app-nav-item svg {
    font-size: 22px;
    width: 22px;
    height: 22px;
    line-height: 1;
}

.app-nav-item:hover {
    color: #0D7377;
}

.app-nav-active {
    color: #0D7377 !important;
}

.app-nav-active i,
.app-nav-active svg {
    color: #0D7377 !important;
}