/* ==========================================================================
   DESIGN SYSTEM & GLOBAL STYLES (style.css)
   ========================================================================== */

/* Design Tokens */
:root {
    --primary-color: #E71919;
    --primary-hover: #FF3B3B;
    --primary-glow: rgba(231, 25, 25, 0.3);
    --primary-gradient: linear-gradient(135deg, #FF3B3B 0%, #E71919 100%);

    --bg-color: #0D0F13;
    --card-bg: rgba(26, 30, 39, 0.85);
    --card-hover-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);

    --text-primary: #F3F4F6;
    --text-secondary: #9CA3AF;
    --text-muted: #6B7280;

    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);

    --success-color: #10B981;
    --success-bg: rgba(16, 185, 129, 0.1);
    --error-color: #EF4444;
    --error-bg: rgba(239, 68, 68, 0.1);
    --warning-color: #F59E0B;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;

    --header-height: 70px;
    --max-width: 1200px;
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base resets */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-sans);
    background-image: linear-gradient(180deg, rgba(13, 15, 19, 0.88) 0%, rgba(13, 15, 19, 0.94) 100%), url('../../img/bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Common Layout Wrapper */
.main-content {
    flex: 1;
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 24px 16px 80px 16px;
    /* Space for bottom mobile nav */
}

@media (min-width: 768px) {
    .main-content {
        padding: 40px 24px 60px 24px;
    }
}

/* Links */
a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-smooth);
}

/* Accessibility */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: var(--border-radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    min-height: 48px;
    /* Touch target */
    gap: 8px;
    width: 100%;
    text-align: center;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #FFFFFF;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 25, 25, 0.4);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--border-hover);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Form Inputs */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    font-family: var(--font-sans);
    font-size: 16px;
    /* Prevents iPhone auto-zoom */
    padding: 14px 16px;
    border-radius: var(--border-radius-md);
    border: 1.5px solid var(--border-color);
    background-color: rgba(13, 15, 19, 0.6);
    color: var(--text-primary);
    outline: none;
    transition: var(--transition-smooth);
    min-height: 48px;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--primary-glow);
    background-color: rgba(13, 15, 19, 0.85);
}

/* Badges & Indicators */
.step-badge-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.step-badge {
    background: var(--primary-color);
    color: #FFFFFF;
    font-weight: 700;
    font-size: 0.85rem;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    color: var(--primary-color);
}

/* Custom Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(16, 24, 40, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 16px;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

/* Skeletons & Loader */
.skeleton {
    background: linear-gradient(90deg, #F2F4F7 25%, #EAECF0 50%, #F2F4F7 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

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

/* ==========================================================================
   STICKY HEADER STYLE
   ========================================================================== */
.main-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(18, 21, 28, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    max-width: var(--max-width);
    margin: 0 auto;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
}

.header-left .brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.brand-text {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    text-transform: uppercase;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    color: #FFFFFF;
    text-decoration: none;
    outline: none;
}

.header-icon-btn:hover {
    background-color: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.header-accent-line {
    height: 3px;
    background: var(--primary-color);
    width: 100%;
}

/* Profile Dropdown Popup */
.header-profile {
    position: relative;
}

.profile-details-popup {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 220px;
    background: #1C202B;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--card-hover-shadow);
    padding: 16px;
    display: none;
    z-index: 101;
    animation: fade-in-up 0.2s ease-out;
}

.header-profile:hover .profile-details-popup {
    display: block;
}

.popup-username {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.popup-uid,
.popup-region {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.popup-divider {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 12px 0;
}

.popup-logout-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--error-color);
}

.popup-logout-btn:hover {
    opacity: 0.8;
}

/* ==========================================================================
   GLOBAL FOOTER STYLE
   ========================================================================== */
.main-footer {
    background-color: rgba(13, 15, 19, 0.7);
    border-top: 1px solid var(--border-color);
    padding: 32px 16px;
    text-align: center;
    margin-top: auto;
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 16px;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-separator {
    color: var(--text-muted);
}

.footer-copyright {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.footer-disclaimer {
    max-width: 600px;
    margin: 0 auto;
    border-top: 1px dashed var(--border-color);
    padding-top: 12px;
}

.footer-disclaimer p {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* ==========================================================================
   TOAST NOTIFICATION STYLE
   ========================================================================== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 350px;
    width: calc(100% - 40px);
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #FFFFFF;
    border-radius: var(--border-radius-md);
    padding: 14px 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border-left: 4px solid var(--primary-color);
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.toast-message {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

.toast-success {
    border-left-color: var(--success-color);
}

.toast-success .toast-icon {
    color: var(--success-color);
}

.toast-error {
    border-left-color: var(--error-color);
}

.toast-error .toast-icon {
    color: var(--error-color);
}

.toast-info {
    border-left-color: var(--primary-color);
}

.toast-info .toast-icon {
    color: var(--primary-color);
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

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

/* ==========================================================================
   HOMEPAGE HERO SLIDER & LOGIN CARD STYLES
   ========================================================================== */

/* Hero Slider */
.hero-section {
    position: relative;
    width: 100%;
    height: 180px;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: var(--card-hover-shadow);
}

@media (min-width: 576px) {
    .hero-section {
        height: 260px;
    }
}

@media (min-width: 768px) {
    .hero-section {
        height: 340px;
    }
}

.slider-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    z-index: 1;
}

.slide.active {
    opacity: 1;
    z-index: 2;
}

/* Slider Overlay */
.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.7) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 16px;
    color: #FFFFFF;
}

@media (min-width: 768px) {
    .slide-overlay {
        padding: 32px;
    }
}

.slide-title {
    font-size: 1.3rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

@media (min-width: 768px) {
    .slide-title {
        font-size: 2.2rem;
    }
}

.slide-description {
    font-size: 0.8rem;
    max-width: 500px;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

@media (min-width: 768px) {
    .slide-description {
        font-size: 1rem;
    }
}

.slider-dots {
    position: absolute;
    bottom: 12px;
    right: 16px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.slider-dot.active {
    background: var(--primary-color);
    width: 20px;
    border-radius: 4px;
}

/* Game Card */
.game-card {
    background: linear-gradient(135deg, rgba(26, 30, 39, 0.9) 0%, rgba(18, 21, 28, 0.95) 100%), url('../../img/logobg.jpg');
    background-size: cover;
    background-position: center;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    padding: 24px;
    box-shadow: var(--card-hover-shadow);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.game-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.game-icon-box {
    width: 54px;
    height: 54px;
    border-radius: var(--border-radius-md);
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 10px var(--primary-glow);
}

.game-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.game-title-meta {
    flex: 1;
}

.game-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
}

.secure-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    margin-top: 4px;
}

/* Tooltip container */
.tooltip-container {
    position: relative;
    display: inline-block;
    cursor: pointer;
    vertical-align: middle;
    margin-left: 6px;
}

.tooltip-icon {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

.tooltip-container:hover .tooltip-icon {
    color: var(--primary-color);
}

.tooltip-text {
    visibility: hidden;
    width: 250px;
    background-color: #101828;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 10px;
    position: absolute;
    z-index: 50;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.4;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #101828 transparent transparent transparent;
}

.tooltip-container:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* ==========================================================================
   LOADING OVERLAY & SKELETON LOADERS
   ========================================================================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(13, 15, 19, 0.98);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.loading-container {
    text-align: center;
    padding: 24px;
    max-width: 400px;
}

.spinner-box {
    width: 80px;
    height: 80px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 24px auto;
}

.circle-outer {
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top-color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    border-radius: 50%;
    animation: spin-clockwise 1.5s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    position: absolute;
}

.circle-inner {
    width: 75%;
    height: 75%;
    border: 3px solid transparent;
    border-left-color: #ff7675;
    border-right-color: #ff7675;
    border-radius: 50%;
    animation: spin-counter-clockwise 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    position: absolute;
}

.loading-icon-center {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: pulse-glow 2s infinite ease-in-out;
}

/* Linear Progress Bar */
.progress-bar-container {
    width: 240px;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    margin: 0 auto 20px auto;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    position: absolute;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, #ff7675 100%);
    border-radius: 2px;
    animation: progress-slide 1.8s infinite cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px var(--primary-glow);
}

@keyframes spin-clockwise {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes spin-counter-clockwise {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(-360deg);
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        transform: scale(0.9);
        opacity: 0.7;
        filter: drop-shadow(0 0 2px rgba(255, 118, 117, 0.4));
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
        filter: drop-shadow(0 0 10px rgba(255, 118, 117, 0.8));
    }
}

@keyframes progress-slide {
    0% {
        left: -40%;
    }

    100% {
        left: 100%;
    }
}

.loading-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.loading-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ==========================================================================
   VERIFICATION MODAL STYLES
   ========================================================================== */
.modal-profile-banner {
    height: 120px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.modal-profile-banner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 20%, rgba(255, 255, 255, 1) 100%);
}

.modal-avatar-wrapper {
    display: flex;
    justify-content: center;
    margin-top: -45px;
    position: relative;
    z-index: 10;
}

.modal-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 4px solid #FFFFFF;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    background-color: #FFFFFF;
}

.modal-profile-info {
    padding: 16px 24px 24px 24px;
    text-align: center;
}

.modal-username {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.modal-uid {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    margin-bottom: 12px;
}

.verified-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: var(--success-bg);
    color: var(--success-color);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 12px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.verified-badge-pill svg {
    width: 14px;
    height: 14px;
}

.modal-details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 12px;
    margin-bottom: 24px;
}

.modal-detail-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-detail-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.modal-detail-value {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-primary);
}

.modal-clan-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-weight: 500;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (min-width: 480px) {
    .modal-actions {
        flex-direction: row;
    }
}

/* Side-by-Side Login Grid & Character Frame */
.login-grid-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 24px;
    width: 100%;
}

.login-grid-container .game-card {
    margin-bottom: 0;
    /* Let grid gap handle margins */
}

.character-frame-card {
    background: linear-gradient(135deg, rgba(26, 30, 39, 0.95) 0%, rgba(18, 21, 28, 0.98) 100%), url('../../img/logobg.jpg');
    background-size: cover;
    background-position: center;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    padding: 24px;
    box-shadow: var(--card-hover-shadow);
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    position: relative;
    min-height: 320px;
}

@media (min-width: 576px) {
    .character-frame-card {
        flex-direction: row;
        align-items: center;
        gap: 16px;
    }
}

.frame-char-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    position: relative;
    margin-bottom: -24px;
}

@media (min-width: 576px) {
    .frame-char-container {
        justify-content: flex-start;
        margin-left: -28px;
    }
}

.frame-character-img {
    max-width: 115%;
    height: auto;
    max-height: 360px;
    object-fit: contain;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.75));
    animation: sideCharFloat 5s ease-in-out infinite;
}

.frame-instructions-container {
    flex: 1.25;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 2;
}

.instructions-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    background: linear-gradient(90deg, #ffffff 0%, #ff7675 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.instructions-divider {
    width: 60px;
    height: auto;
    display: block;
    margin-bottom: 16px;
    opacity: 0.8;
}

.instructions-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.instructions-list li {
    font-size: 0.82rem;
    line-height: 1.4;
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.step-num {
    background: var(--primary-color);
    color: #fff;
    font-weight: 800;
    font-size: 0.72rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
    box-shadow: 0 0 6px var(--primary-glow);
}

@keyframes sideCharFloat {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-8px) scale(1.02);
    }
}

@media (min-width: 768px) {
    .login-grid-container {
        grid-template-columns: 1.25fr 1fr;
        align-items: stretch;
    }
}

/* Garena In-game Profile Card Replica with profilebg.png background */
.garena-profile-card {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    position: relative;
    border-radius: 8px;
    border: 2px solid #f1c40f;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.9);
    overflow: hidden;
    aspect-ratio: 350 / 152;
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    font-family: 'Inter', sans-serif;
}

.garena-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 1;
    pointer-events: none;
}

.garena-card-content {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
}

/* Square Avatar Container (positioned lower down matching reference image) */
.garena-avatar-container {
    position: absolute;
    top: 26.0%;
    left: 11.5%;
    width: 18.5%;
    height: 48.0%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    border: 2px solid #ffffff;
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

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

/* Level Overlay positioned under the avatar box */
.garena-level-badge {
    position: absolute;
    top: 79.0%;
    left: 10.0%;
    font-size: clamp(11px, 3.2vw, 14px);
    font-weight: 900;
    color: #000000;
    text-shadow: none;
}

/* Username Overlay with Gender Icon */
.garena-username-container {
    position: absolute;
    top: 25.5%;
    left: 34.0%;
    display: flex;
    align-items: center;
    gap: 4px;
}

.gender-icon-svg {
    flex-shrink: 0;
}

.garena-username-val {
    font-size: clamp(13px, 4vw, 17px);
    font-weight: 900;
    color: #0f172a;
    letter-spacing: 0.2px;
}

/* Language line ("English") below username */
.garena-signature-val {
    position: absolute;
    top: 44.0%;
    left: 34.0%;
    font-size: clamp(9px, 2.6vw, 12px);
    color: #1e293b;
    font-weight: 700;
}

/* Mini Tag Icons Row under English */
.garena-tags-row {
    position: absolute;
    top: 66.0%;
    left: 34.0%;
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0.95;
}

/* Likes Container with Thumbs-up (like) Icon */
.garena-likes-container {
    position: absolute;
    top: 61.0%;
    right: 7.0%;
    display: flex;
    align-items: center;
    gap: 4px;
    color: #0f172a;
}

.like-thumb-svg {
    width: 17px;
    height: 17px;
    fill: #0f172a;
}

.garena-likes-val {
    font-size: clamp(14px, 4.2vw, 18px);
    font-weight: 900;
    color: #0f172a;
    letter-spacing: 0.2px;
}

/* UID Overlay positioned at bottom-right in dark bar */
.garena-uid-container {
    position: absolute;
    top: 82.0%;
    right: 4.5%;
    display: flex;
    align-items: center;
    gap: 4px;
}

.uid-prefix-label {
    font-family: monospace;
    font-weight: 800;
    font-size: clamp(10px, 2.8vw, 12px);
    color: rgba(255, 255, 255, 0.85);
}

.uid-val-text {
    font-family: monospace;
    font-weight: 800;
    font-size: clamp(10px, 2.8vw, 12px);
    color: #ffffff;
}

.copy-icon-svg {
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    width: 11px;
    height: 11px;
    transition: color 0.2s ease;
}

.copy-icon-svg:hover {
    color: #ffffff;
}

/* Sleek Modal Redirect Progress Line Bar */
.modal-redirect-loading {
    margin-top: 18px;
    padding: 0 10px;
    text-align: center;
}

.modal-redirect-text {
    font-size: 0.82rem;
    font-weight: 800;
    color: #ffd800;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* Hardware GPU Acceleration for 60fps Mobile Performance */
.garena-profile-card,
.verification-modal-content,
.login-card,
.modal-progress-bar-fill {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.modal-progress-bar-track {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.modal-progress-bar-fill {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #ff416c, #ff4b2b, #ffd800);
    border-radius: 6px;
    transform: scaleX(0);
    transform-origin: left center;
}

.verification-modal.active .modal-progress-bar-fill {
    animation: fillProgressBar 1.0s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes fillProgressBar {
    0% { transform: scaleX(0); }
    100% { transform: scaleX(1); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}