/* Clean & Minimalist Modern Dark Theme for Minecraft Donate Portal with Smooth Animations */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #06b6d4;
    --primary-hover: #059669;
    --bg-main: #0b0f19;
    --bg-card: #111827;
    --border: #1f2937;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-main);
    color: #f3f4f6;
    min-height: 100vh;
}

/* Card tối giản */
.clean-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.clean-card:hover {
    border-color: #374151;
}

/* =========================================================
   HIỆU ỨNG LOAD QR VIETQR
   ========================================================= */
.qr-wrapper {
    position: relative;
    border-radius: 16px;
    background: #ffffff;
    padding: 10px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 0 20px rgba(16, 185, 129, 0.1);
    overflow: hidden;
    transition: all 0.3s var(--ease-out-expo);
}

.qr-wrapper:hover {
    box-shadow: 0 12px 30px -5px rgba(0, 0, 0, 0.5), 0 0 25px rgba(16, 185, 129, 0.25);
    transform: translateY(-2px);
}

/* Hiệu ứng mờ dần khi load ảnh QR */
.qr-img {
    transition: filter 0.35s var(--ease-out-expo), opacity 0.35s var(--ease-out-expo), transform 0.35s var(--ease-out-expo);
    transform-origin: center center;
}

.qr-image-loading {
    filter: blur(6px) grayscale(40%);
    opacity: 0.3;
    transform: scale(0.96);
}

.qr-image-loaded {
    filter: blur(0px) grayscale(0%);
    opacity: 1;
    transform: scale(1);
}

/* Loading Overlay */
#vietqr-loading {
    transition: opacity 0.25s ease;
}

/* Spinner vòng tròn phát sáng kép */
.dual-ring-spinner {
    display: inline-block;
    width: 44px;
    height: 44px;
    position: relative;
}

.dual-ring-spinner:after {
    content: " ";
    display: block;
    width: 36px;
    height: 36px;
    margin: 4px;
    border-radius: 50%;
    border: 3px solid #06b6d4;
    border-color: #06b6d4 transparent #06b6d4 transparent;
    animation: dualRingSpin 1s linear infinite;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

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

/* =========================================================
   KEYFRAME ANIMATIONS (HOẠT ẢNH CHUYỂN ĐỘNG)
   ========================================================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes tabSwitchIn {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.99);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.anim-fade-up {
    animation: fadeInUp 0.5s var(--ease-out-expo) forwards;
}

.anim-fade-up-d1 {
    animation: fadeInUp 0.5s 0.08s var(--ease-out-expo) both;
}

.anim-fade-up-d2 {
    animation: fadeInUp 0.5s 0.16s var(--ease-out-expo) both;
}

.anim-fade-up-d3 {
    animation: fadeInUp 0.5s 0.24s var(--ease-out-expo) both;
}

.anim-scale-in {
    animation: scaleIn 0.35s var(--ease-out-expo) forwards;
}

/* Tab Animation */
.tab-pane.tab-fade-in {
    animation: tabSwitchIn 0.3s var(--ease-out-expo) forwards;
}

/* Minecraft Avatar Rendering & Hover */
.mc-avatar {
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    transition: transform 0.2s var(--ease-out-expo);
}

.mc-avatar:hover {
    transform: scale(1.08) rotate(3deg);
}

/* Tabs Navigation Buttons */
.tab-switch-btn {
    transition: all 0.25s var(--ease-out-expo);
    position: relative;
}

.tab-switch-btn.active-tab {
    background-color: #1f2937 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transform: translateY(-1px);
}

.tab-switch-btn:active {
    transform: scale(0.97);
}

/* Preset Buttons, Telco Buttons & Card Denom Buttons */
.preset-btn, .card-denom-btn, .telco-btn {
    transition: all 0.2s var(--ease-out-expo);
    border: 1px solid var(--border);
    background-color: #161f30;
}

.preset-btn:hover, .card-denom-btn:hover, .telco-btn:hover {
    border-color: #4b5563;
    background-color: #1e293b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.preset-btn:active, .card-denom-btn:active, .telco-btn:active {
    transform: scale(0.96) translateY(0);
}

.preset-btn.active, .card-denom-btn.active, .telco-btn.active {
    background-color: rgba(16, 185, 129, 0.14) !important;
    border-color: #06b6d4 !important;
    color: #06b6d4 !important;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.2);
    transform: translateY(-2px);
}

/* Nút Copy hiệu ứng */
.btn-copy {
    transition: all 0.15s ease;
}

.btn-copy:hover {
    transform: scale(1.06);
}

.btn-copy:active {
    transform: scale(0.92);
}

/* Mobile Drawer Animation */
#mobile-drawer {
    transition: visibility 0.3s ease;
}

#mobile-drawer-backdrop {
    transition: opacity 0.3s ease;
}

#mobile-drawer-panel {
    transition: transform 0.35s var(--ease-out-expo);
}

.drawer-hidden {
    visibility: hidden;
}

.drawer-hidden #mobile-drawer-backdrop {
    opacity: 0;
    pointer-events: none;
}

.drawer-hidden #mobile-drawer-panel {
    transform: translateX(100%);
}

/* Toast Container & Spring Animation */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    animation: toastIn 0.35s var(--ease-out-expo) forwards;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.toast.hiding {
    animation: toastOut 0.25s ease forwards;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.92);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(16px) scale(0.95);
    }
}
