/* style.css (v5.1 Final) */
:root {
    --bg-color: #0f172a;
    --primary-accent: #00f5ff;
    --secondary-accent: #e94560;
    --highlight-yellow: #feca57;
    --text-color: #e0e0e0;
    --text-muted: #cbd5e1;
    --font-primary: 'Orbitron', sans-serif;
    --font-secondary: 'Poppins', sans-serif;
    --glass-bg: rgba(31, 41, 55, 0.35);
    --glass-border: 1px solid rgba(255, 255, 255, 0.18);
    --glass-blur: blur(12px);
}

@keyframes gradient-animation {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-secondary);
    color: var(--text-color);
    background: linear-gradient(-45deg, #0f172a, #1e3a8a, #4c1d95, #be185d);
    background-size: 400% 400%;
    animation: gradient-animation 25s ease infinite;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

.container {
    width: 100%;
    max-width: 500px;
    padding-bottom: 80px;
    /* Add padding for floating button */
}

.form-container,
.history-container,
.modal-content,
.dashboard-card,
.marquee-container,
header {
    background: var(--glass-bg);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    padding: 20px;
}

header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px 20px;
    gap: 15px;
}

.site-logo {
    height: 40px;
    width: auto;
    flex-shrink: 0;
}

h2 {
    font-family: var(--font-primary);
    text-align: center;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 0;
    margin-bottom: 30px;
    text-shadow: 0 0 8px var(--primary-accent), 0 0 12px rgba(0, 245, 255, 0.5);
}

.auth-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex-shrink: 1;
    text-align: right;
    
}

.welcome-text {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}

.auth-buttons a,
.back-button {
    font-family: var(--font-primary);
    font-size: 14px;
    color: var(--text-color);
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: var(--glass-bg);
    border: var(--glass-border);
    white-space: nowrap;
}

.auth-buttons a:hover,
.back-button:hover {
    background: rgba(0, 245, 255, 0.2);
    border: 1px solid var(--primary-accent);
    box-shadow: 0 0 15px rgba(0, 245, 255, 0.3);
    color: #fff;
}

.link-yellow {
    color: var(--highlight-yellow) !important;
    font-weight: bold;
    font-size: 14px;
    text-decoration: underline !important;
    background: none !important;
    border: none !important;
    padding: 10px !important;
    margin-left: 0;
}

.dashboard-full-button {
    display: block;
    width: 100%;
    background: var(--glass-bg);
    border: 1px solid var(--primary-accent);
    color: #fff;
    text-align: center;
    padding: 15px;
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 10px;
    box-sizing: border-box;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 245, 255, 0.3);
}

button[type="submit"],
.modal-ok-button {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(45deg, var(--secondary-accent), #8a2be2);
    color: white;
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.splide {
    margin-bottom: 30px;
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.splide__slide {
    aspect-ratio: 16 / 9;
}

.splide__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.marquee-container {
    margin-bottom: 30px;
    padding: 15px 0;
    overflow: hidden;
    white-space: nowrap;
}

.marquee-text {
    display: inline-block;
    color: var(--text-muted);
    animation: marquee 20s linear infinite;
    padding-left: 100%;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 15px;
    margin-bottom: 40px;
}

.game-card,
.package-card,
.payment-card,
.history-item,
.redeem-item {
    background: var(--glass-bg);
    border: 2px solid transparent;
    border-radius: 10px;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.game-card:hover,
.package-card:hover,
.payment-card:hover,
.history-item:hover,
.redeem-item:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 245, 255, 0.5);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.package-card.selected,
.payment-card.selected {
    border-color: var(--primary-accent);
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.5);
    transform: scale(1.05);
}

.game-card {
    text-decoration: none;
    color: var(--text-color);
     padding: 20px;
    display: flex;
    align-items: start;
}

.game-card img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    margin-right: 15px;
}

.game-card span {
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: 10px;
    white-space: normal;
    overflow-wrap: break-word;
    flex: 1;
}

.package-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.package-card {
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

.package-card-image {
    width: 100%;
    height: 100px;
    object-fit: contain;
}

.package-card-content {
    padding: 8px 10px;
}

.package-card-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-color);
    white-space: normal;
    /* Allow text to wrap */
    overflow-wrap: break-word;
    /* Break long words if necessary */
    min-height: 40px;
    /* Give space for 2 lines to prevent layout jumps */
}

.package-card-bonus {
    font-size: 12px;
    color: var(--text-muted);
    min-height: 16px;
}

.package-card-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-accent);
    margin-top: 5px;
}

.package-tag {
    position: absolute;
    top: 8px;
    left: -1px;
    background-color: var(--secondary-accent);
    color: white;
    padding: 3px 8px;
    font-size: 10px;
    font-weight: bold;
    border-radius: 0 4px 4px 0;
    text-transform: uppercase;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
}

.history-item.item-clickable {
    cursor: pointer;
}

.history-item .item-data,
#recent-accounts-list .history-item .item-data {
    color: var(--text-color);
}

.history-item .order-date,
#recent-accounts-list .history-item .order-date {
    color: var(--text-muted);
}

label {
    display: block;
    margin: 15px 0 8px;
    color: var(--text-muted);
    font-weight: 600;
}

.see-recent-btn {
    color: var(--highlight-yellow);
    text-decoration: underline;
    font-size: 13px;
    cursor: pointer;
    transition: color 0.2s;
    margin-left: 8px;
    font-weight: 400;
}

.see-recent-btn:hover {
    color: var(--primary-accent);
}

input,
select {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    box-sizing: border-box;
    color: var(--text-color);
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary-accent);
    box-shadow: 0 0 10px rgba(0, 245, 255, 0.5);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: flex-start;
    padding-top: 5vh;
    overflow-y: auto;
}

.modal.show {
    display: flex;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    animation: slide-down 0.4s ease-out;
    max-width: 450px;
    width: 90%;
    margin-bottom: 5vh;
}

@keyframes slide-down {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }

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

.close-btn {
    color: #aaa;
    float: right;
    font-size: 35px;
    font-weight: bold;
    position: absolute;
    top: 5px;
    right: 15px;
}

#package-search-box {
    font-family: var(--font-secondary);
}

.payment-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.payment-card {
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.payment-card img {
    height: 40px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.payment-card span {
    margin-top: 10px;
    font-weight: 600;
    color: var(--text-muted);
}

.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    margin-left: 10px;
}

.status-pending {
    background-color: #f0932b;
}

.status-approved {
    background-color: #2ed573;
}

.status-rejected {
    background-color: #ff4757;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

#recent-accounts-list .history-item .item-data {
    color: var(--highlight-yellow);
}

#recent-accounts-list .account-name-result {
    display: block;
    color: var(--highlight-yellow);
    font-size: 13px;
    font-weight: bold;
    margin-top: 4px;
}

#recent-accounts-list .account-name-result.checking {
    color: var(--text-muted);
    font-style: italic;
}

#recent-accounts-list .account-name-result.error {
    color: var(--secondary-accent);
    font-style: italic;
}

.dashboard-card {
    border: 1px solid var(--border-color);
}

.card-title {
    font-family: var(--font-primary);
    color: var(--primary-accent);
    font-size: 18px;
    margin-bottom: 10px;
}

.points-display {
    font-family: var(--font-primary);
    font-size: 32px;
    font-weight: 700;
    color: var(--highlight-yellow);
    text-align: center;
}

.referral-link-box {
    display: flex;
    margin-top: 15px;
}

.referral-link-box input {
    flex-grow: 1;
    background-color: #1a1a2e;
    border-right: none;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    margin-bottom: 0;
}

.referral-link-box button {
    border-radius: 8px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border: 1px solid var(--border-color);
    background-color: var(--primary-accent);
    color: var(--bg-color);
    font-family: var(--font-primary);
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
    padding: 0 20px;
}

.redeem-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    border-left: 4px solid var(--secondary-accent);
}

.redeem-item-name {
    font-weight: 600;
}

.redeem-item-cost {
    font-size: 14px;
    color: var(--text-muted);
}

.redeem-btn {
    border: none;
    border-radius: 6px;
    background-color: var(--highlight-yellow);
    color: var(--bg-color);
    font-family: var(--font-primary);
    font-weight: bold;
    cursor: pointer;
    padding: 8px 15px;
    transition: all 0.2s;
}

.redeem-btn:hover {
    background-color: #fff;
    box-shadow: 0 0 10px var(--highlight-yellow);
}

.redeem-btn:disabled {
    background-color: var(--border-color);
    color: var(--text-muted);
    cursor: not-allowed;
}

td .action-btn {
    margin-bottom: 5px;
}

#order-modal-title {
    color: var(--highlight-yellow);
}

#selected-package-info {
    text-align: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

#selected-package-name {
    font-weight: bold;
    color: var(--text-color);
    display: block;
}

#selected-package-price {
    color: var(--primary-accent);
    font-family: var(--font-primary);
}

.payment-info {
    margin-top: 15px;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.form-actions button {
    flex: 1;
    margin-top: 0;
}

.cancel-btn {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    background-image: none;
}

.cancel-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-color);
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

#alert-modal .modal-content {
    padding-top: 25px;
    text-align: center;
}

#alert-modal h2 {
    color: var(--highlight-yellow);
    margin-bottom: 15px;
    font-size: 24px;
}

#alert-modal p {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 16px;
    margin-bottom: 20px;
}

.error-modal-content {
    text-align: center;
    padding: 40px;
}

.error-icon {
    font-size: 50px;
    color: var(--secondary-accent);
    margin-bottom: 20px;
    font-weight: bold;
}

.error-modal-content h2 {
    color: var(--secondary-accent);
}

.error-modal-content p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.success-modal-content {
    text-align: center;
    padding: 40px;
}

.success-icon {
    font-size: 50px;
    color: #2ed573;
    margin-bottom: 20px;
}

.success-modal-content h2 {
    color: #2ed573;
}

.success-modal-content p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.floating-cs-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: var(--glass-bg);
    border: 1px solid var(--primary-accent);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.5);
    cursor: pointer;
    z-index: 999;
    padding: 10px;
    transition: all 0.3s ease;
}

.floating-cs-button:hover {
    transform: scale(1.1);
}

.floating-cs-button img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#cs-modal .modal-content {
    text-align: center;
}

#cs-modal h2 {
    color: var(--highlight-yellow);
}

#cs-modal p {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 16px;
    margin-bottom: 25px;
}

.cs-button-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cs-button {
    display: block;
    padding: 15px;
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    font-family: var(--font-primary);
    font-weight: 700;
    transition: all 0.3s ease;
    color: white;
}

.cs-call-btn {
    background: #2ed573;
}

.cs-telegram-btn {
    background: #0088cc;
}

/*profile*/

/* --- Top 10 Buyers List Styles --- */
.leaderboard {
    list-style: none;
    padding: 0;
    margin: 0;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 10px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.leaderboard-item:hover {
    background-color: rgba(0, 0, 0, 0.4);
    border-color: var(--primary-accent);
}

.leaderboard-rank {
    font-family: var(--font-primary);
    font-size: 18px;
    font-weight: bold;
    color: var(--highlight-yellow);
    width: 30px;
    text-align: center;
    flex-shrink: 0;
}

.leaderboard-name {
    font-weight: 600;
    color: var(--text-color);
    margin-left: 15px;
    flex-grow: 1;
}

.leaderboard-amount {
    font-weight: bold;
    color: var(--primary-accent);
    font-size: 14px;
}

/*userr management*/
/* --- User Management Styles --- */
.user-search-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.user-search-container input {
    flex-grow: 1;
    margin-bottom: 0;
    background-color: #374151;
    border: 1px solid #4B5563;
    color: #F3F4F6;
    padding: 10px;
    border-radius: 6px;
    font-size: 16px;
}

.user-search-container button {
    padding: 10px 20px;
    font-size: 14px;
    font-family: var(--font-primary, 'Orbitron');
    background: var(--primary-accent);
    color: var(--bg-color);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

#user-list-tbody .action-btn {
    font-size: 12px;
    padding: 5px 10px;
}

.modal-form label {
    display: block;
    margin: 15px 0 8px;
    color: #9CA3AF;
    font-weight: 600;
}

.modal-form input {
    width: 100%;
    box-sizing: border-box;
    background-color: #374151;
    border: 1px solid #4B5563;
    color: #F3F4F6;
    padding: 10px;
    border-radius: 6px;
    font-size: 16px;
    margin-bottom: 20px;
}

.modal-form button {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-accent);
    color: var(--bg-color);
    border: none;
    border-radius: 6px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
}


/* --- NEW: App Download Modal --- */
#app-download-modal .modal-content {
    text-align: center;
}

#app-download-modal h2 {
    color: var(--primary-accent);
    margin-bottom: 20px;
}

#app-download-modal p {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 16px;
    margin-bottom: 25px;
}

#app-download-modal .app-download-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 25px;
}

.app-download-btn {
    display: block;
    padding: 15px;
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    font-family: var(--font-primary);
    font-weight: 700;
    transition: all 0.3s ease;
    color: white;
}

.btn-telegram {
    background: #0088cc;
    /* Telegram Blue */
}

.btn-mediafire {
    background: #1d94ff;
    /* Mediafire Blue */
}

.btn-close-app-modal {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    background-image: none;
    margin-top: 20px;
    padding: 12px;
    font-size: 14px;
}

/* --- NEW: App Download Modal "Already Downloaded" Button --- */
.btn-already-downloaded {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-muted);
    background-image: none;
    margin-top: 10px;
    /* Adjust spacing */
    padding: 12px;
    font-size: 14px;
}

.btn-already-downloaded:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-color);
    color: var(--text-color);
}

/* --- NEW: Spin Page Styles --- */
.spin-container {
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    /* ဤနေရာတွင် Casing အရောင် ထည့်ပါ */
    border-radius: 10px;
    margin-bottom: 25px;
    text-align: center;
}

.spin-wheel-placeholder {
    width: 100%;
    max-width: 300px;
    height: 300px;
    background: #111827;
    border: 3px dashed var(--primary-accent);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px auto;
    font-family: var(--font-primary);
    color: var(--primary-accent);
    text-shadow: 0 0 10px var(--primary-accent);
}

.spin-button {
    width: 100%;
    max-width: 250px;
    padding: 18px;
    border: none;
    border-radius: 50px;
    background: linear-gradient(45deg, #feca57, #ff9f43);
    color: #111827;
    font-family: var(--font-primary);
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(254, 202, 87, 0.4);
    margin-top: 10px;
}

.spin-button:disabled {
    background: #374151;
    color: var(--text-muted);
    cursor: not-allowed;
    box-shadow: none;
}

/* --- NEW: Lucky Spin Box Styles (v5.5) --- */
.spin-grid {
        display: grid;
            grid-template-columns: repeat(2, 1fr); /* ၃ တန်း အစား ၂ တန်း ပြန်ပြောင်းပါ */
                gap: 15px;
                    margin: 20px 0;
                    }


.spin-card {
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    border-radius: 10px;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 10px;
    font-family: var(--font-primary);
    font-weight: 600;
    color: var(--text-color);
    transition: all 0.1s ease-in-out;
}

.spin-card.active {
    /* This is the highlight during animation */
    border-color: var(--primary-accent);
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.7);
    transform: scale(1.05);
}

.spin-card.winner {
    /* This is the final winning box */
    border-color: var(--highlight-yellow);
    background: rgba(254, 202, 87, 0.2);
    box-shadow: 0 0 25px rgba(254, 202, 87, 0.7);
    transform: scale(1.1);
}
/* --- NEW: Redeem Link Button (on Spin Page) --- */
.redeem-link-btn {
    display: block;
    width: 90%;
    margin: 15px auto 0;
    padding: 12px;
    font-size: 14px;
    font-family: var(--font-primary);
    font-weight: 600;
    color: var(--highlight-yellow);
    text-decoration: none;
    text-align: center;
    border: 1px solid var(--highlight-yellow);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.redeem-link-btn:hover {
    background-color: rgba(254, 202, 87, 0.2);
    box-shadow: 0 0 10px rgba(254, 202, 87, 0.5);
}

/* --- Recent History Text Size (ပြင်ဆင်ချက်) --- */

.history-item .item-data {
    font-size: 0.7rem;
    /* (1rem ကနေ 0.9rem ကို သေးလိုက်) */
    font-weight: 600;
}

.history-item .order-date {
    font-size: 0.7rem;
    /* (0.8rem ကနေ 0.75rem ကို သေးလိုက်) */
}

.history-item .price {
    font-size: 0.7rem;
    /* (1rem ကနေ 0.9rem ကို သေးလိုက်) */
    font-weight: 600;
}

.history-item .status-badge {
    font-size: 10px;
    /* (12px ကနေ 11px ကို သေးလိုက်) */
    padding: 4px 10px;
    /* (နည်းနည်း ပိုကျစ်လစ်သွားအောင်) */
}
