:root {
    --primary: #0bc2cf;
    --primary-dark: #008ea1;
    --secondary: #3a3a3a;
    --bg-light: #f4f7f8;
    --card-bg: #ffffff;
    --text-main: #3a3a3a;
    --text-muted: #6b7280;
    --accent: #ed5565;
    --success: #8cc152;
    --radius: 12px;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    background-color: #0bc2cf;
    /* Rich Animated Gradient Background */
    background: linear-gradient(-45deg, #0bc2cf, #31aae0, #9a49aa, #23d5ab);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    font-size: 18px;
    display: flex;
    flex-direction: column;
}

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

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

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

.navbar {
    padding: 1rem 0;
    box-shadow: 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1001;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Titan One', sans-serif;
    font-size: 2rem;
    text-decoration: none;
    color: white;
    display: flex;
    align-items: center;
}

.logo span {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 800;
    font-size: 1.1rem;
    transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.container {
    max-width: 1000px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

.main-layout {
    display: flex;
    justify-content: center;
}

.card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.18);
    width: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

section.left-panel {
    width: 100%;
}

.pack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.pack-card {
    background: var(--white);
    border: 3px solid var(--border-light);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.27);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.05);
}

.pack-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.pack-card.selected {
    border-color: var(--primary);
    background: rgba(11, 194, 207, 0.05);
    box-shadow: 0 0 0 4px rgba(11, 194, 207, 0.2);
}

.pack-card h4 {
    font-size: 1.25rem;
    margin: 0;
    color: var(--text-dark);
}

.pack-cost {
    font-size: 1rem;
    color: var(--text-medium);
    font-weight: 700;
}

.pack-icon-placeholder {
    width: 60px;
    height: 60px;
    background: var(--beige);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

h3 {
    font-family: 'Titan One', sans-serif;
    margin-bottom: 10px;
    font-size: 2.8rem;
    color: var(--secondary);

    line-height: 1.2;
}

.input-group {
    margin-bottom: 2rem;
}

label {
    display: block;
    color: var(--text-main);
    font-weight: 800;
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
}

.checkbox-group span {
    font-size: 1.4rem;
}

input,
select {
    width: 100%;
    padding: 1.2rem;
    background: #f8fafc;
    border: 3px solid #e2e8f0;
    border-radius: 8px;
    color: var(--text-main);
    outline: none;
    font-size: 1.3rem;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
}

input:focus,
select:focus {
    border-color: var(--primary);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    font-weight: 700;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
    margin-bottom: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
    border-radius: 8px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 8px;
}

input:checked+.slider {
    background-color: var(--primary);
}

input:checked+.slider:before {
    transform: translateX(22px);
}

.btn-primary {
    width: 100%;
    padding: 1.25rem;
    background: var(--primary);
    color: white;
    border: none;
    border-bottom: 6px solid var(--primary-dark);
    border-radius: 8px;
    font-weight: 900;
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.1s;
    text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.1);
    width: auto;
}

.btn-primary:active {
    transform: translateY(3px);
    border-bottom-width: 3px;
}

/* Modal / Popup Results */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
}

.modal-content {
    background: var(--white);
    width: 95%;
    max-width: 1400px;
    max-height: 90vh;
    border-radius: 8px;
    padding: 1rem 2.5rem;
    position: relative;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    border: 5px solid var(--primary);
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
}

.results-header {
    text-align: center;
    /* margin-bottom: 2rem; */
}

.results-tabs {
    display: inline-flex;
    background: #f1f5f9;
    padding: 0.5rem;
    border-radius: 8px;
    gap: 0.5rem;
    margin-top: 1rem;
}

.res-tab-btn {
    background: transparent;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 800;
    font-size: 1rem;
    color: var(--text-muted);
}

.res-tab-btn.active {
    background: var(--primary);
    color: var(--white);
}

/* Results Bottom Section (50/50 Split) */
.results-bottom-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1rem;
}

.summary-column {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1.5rem;
    border: 3px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}

.summary-grid-vertical {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.summary-box {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    text-align: left;
    font-weight: 700;
    font-size: 1.3rem;
}

.chart-column {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1.5rem;
    border: 3px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.mini-select {
    padding: 0.5rem;
    font-size: 0.9rem;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    font-weight: 800;
    width: auto;
}

@media (max-width: 900px) {
    .results-bottom-row {
        grid-template-columns: 1fr;
    }
}

/* Blook Grid */
.blook-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 10px;
}

.blook-item {
    background: var(--white);
    border: 3px solid #e2e8f0;
    border-radius: 8px;
    padding: 4px 10px 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.1s;
    position: relative;
}

.blook-item:hover {
    transform: scale(1.05);
    z-index: 10;
}

.blook-icon {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    padding: 0;
    position: relative;
    flex-shrink: 0;
}

.blook-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.rarity-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    border-radius: 0 0 8px 8px;
}

.info h4 {
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    font-size: 1.8rem;
}

.info p {
    font-weight: 700;
    color: var(--text-muted);
    font-size: 1.2rem;
}

.info p span {
    font-size: 1.4rem;
}

.summary-column h4,
.chart-header h4,
.chart-header select {
    font-size: 1.5rem;
}

.info span {
    color: var(--primary);
    font-weight: 800;
}

/* Pages: Trackers & Strategy */
.hero {
    text-align: center;
    margin-bottom: 3rem;
}

.hero h2 {
    font-family: 'Titan One', sans-serif;
    font-size: 3rem;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.calculator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.strategies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.tracker-result {
    margin-top: 1.5rem;
    padding: 1.2rem;
    border-radius: 8px;
    background: #f1f5f9;
    text-align: center;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--primary-dark);
}

/* Rarity Colors */
.uncommon {
    background: #8cc152;
}

.rare {
    background: #4a89dc;
}

.epic {
    background: #967adc;
}

.legendary {
    background: #f6bb42;
}

.chroma {
    background: #da4453;
}


.blook-name {
    font-size: 1.8rem;
    font-weight: 700;
}

.blook-chance {
    font-size: 1.4rem;
    color: #3bafda;
    font-weight: 700;
}

@media (max-width: 768px) {
    .dis_flexwrap {
        display: grid;
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .dis_flexwrap .input-group {
        width: 100% !important;
        margin-bottom: 1rem;
    }

    .dis_flexwrap button {
        width: 100% !important;
    }

    .container {
        padding: 0 15px;
        margin-top: 1rem;
        margin-bottom: 1rem;
    }

    .page-title {
        font-size: 2.2rem;
    }

    .card {
        padding: 1.5rem;
    }

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

    .blook-item {
        padding: 10px;
    }

    .info h4 {
        font-size: 1.4rem;
    }

    .results-top-row {
        grid-template-columns: 1fr;
    }

    .navbar .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0 1rem;
    }

    .nav-menu {
        display: none;
    }

    .nav-menu.active {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--purple);
        flex-direction: column;
        padding: 1rem;
        z-index: 1000;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
        padding: 0.5rem 0;
    }

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

    .pack-card {
        padding: 1rem;
    }

    .pack-card h4 {
        font-size: 1rem;
        word-break: break-word;
    }

    /* Grids across the site */
    [style*="grid-template-columns: 1fr 1fr"],
    [style*="grid-template-columns: 1fr 1fr 1fr"],
    .calculator-grid,
    .strategies-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    .page-title {
        font-size: 2rem !important;
        padding: 0 0.5rem;
    }

    .page-subtitle {
        font-size: 1.1rem !important;
        padding: 0 1rem;
    }

    .card,
    .content-card {
        padding: 1.25rem !important;
        width: 100% !important;
        max-width: none !important;
    }

    .btn {
        font-size: 1.2rem !important;
    }

    .tool-tabs {
        flex-direction: column;
        width: 100%;
    }

    .tool-tabs button {
        width: 100% !important;
        min-width: 0 !important;
    }
}

footer {
    padding: 4rem 1.5rem;
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 700;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Blooket Brand Colors */
    --cyan: #00C9DB;
    --cyan-hover: #00B0C0;
    --purple: #9a49aa;
    --purple-dark: #7a3888;
    --cream: #FAF8F5;
    --beige: #F5F3EF;
    --sky-blue: #A8D8EA;
    --white: #ffffff;
    --black: #000000;
    --text-dark: #2C3E50;
    --text-medium: #5A6C7D;
    --text-light: #8899A6;
    --border-light: #E8E6E3;
    --shadow-color: rgba(0, 0, 0, 0.08);
    --shadow-color-strong: rgba(0, 0, 0, 0.15);

    /* Mapped Theme Colors */
    --primary-color: var(--cyan);
    --primary-hover: var(--cyan-hover);
    --secondary-color: var(--purple);
    --background-color: var(--cream);
    --surface-color: var(--white);
    --border-color: var(--border-light);
    --text-primary: var(--text-dark);
    --text-secondary: var(--text-medium);
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --shadow: 0 2px 8px 0 var(--shadow-color);
    --shadow-lg: 0 8px 24px 0 var(--shadow-color-strong);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #0bc2cf;
    background-image: linear-gradient(180deg, #31aae0, #bbddff);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(15deg);
    opacity: 0.1;
    background-image: url('https://ac.blooket.com/@codeblooket/blooket-frontend-components/v0.2.36/assets/BlookCheckers-e975c505.png');
    background-size: 550px;
    background-repeat: repeat;
    width: 200%;
    height: 200%;
    z-index: -1;
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
.site-header {
    background-color: #9a49aa;
    box-shadow: 0 -6px rgba(0, 0, 0, 0.2) inset;
    top: 0;
    z-index: 1000;
    padding-bottom: 6px;
}

.navbar {
    padding: 1rem 0;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-text {
    color: white;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-menu {


    display: flex;
    list-style: none;
    gap: 1.25rem;
    align-items: center;
    font-family: 'Nunito', sans-serif;
}

.nav-link {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    transition: color 0.2s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--cyan);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--cyan);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: var(--cyan);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 1rem 0;
}

.page-header {
    text-align: center;
    margin-bottom: 1rem;
}

.page-title {
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.page-subtitle {
    font-size: 1.25rem;
    color: var(--text-primary);
}

.content-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.95);
}

.content-card h2 {
    color: var(--text-primary);
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.content-card h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
}

.content-card p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 10px;
}

.content-card ul,
.content-card ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.content-card li {
    margin-bottom: 0.5rem;
    line-height: 1.8;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    letter-spacing: 0.3px;
}

.btn-primary {
    background-color: #9a49aa;
    color: white;
    box-shadow: 0 -6px rgba(0, 0, 0, 0.2) inset;
    padding-bottom: 1rem;
}

.btn-primary:hover {
    background-color: #b563c7;
    transform: translateY(-2px);

}

.btn-secondary {
    background-color: #9a49aa;
    color: white;
    border: 2px solid var(--purple-dark);
    box-shadow: 0 -6px rgba(0, 0, 0, 0.2) inset;
    padding-bottom: 1rem;
}

.btn-secondary:hover {
    background-color: #b563c7;
    transform: translateY(-2px);

}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
    background-color: var(--surface-color);
    color: var(--text-primary);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 201, 219, 0.15);
    background-color: var(--white);
}

.form-textarea {
    resize: vertical;
    min-height: 150px;
}

/* Footer with Waves */
.site-footer {
    background-color: transparent;
    border-top: none;
    padding: 0;
    margin-top: auto;
    position: relative;
}

.waves {
    width: 100%;
    position: relative;
    height: 100px;
    overflow: hidden;
}

.waves svg {
    width: 100%;
    height: 100%;
}

.footer-wrapper {
    background-color: #1671e9;
    position: relative;
    z-index: 3;
}

.footer-content {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 7.5%;
    padding: 2rem 0 0 0;
    background-color: #1671e9;
    z-index: 2;
    position: relative;
}

.menu-list {
    min-width: 150px;
}

.menu-title {
    color: white;
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
    margin-top: 0;
}

.menu-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-item {
    margin-bottom: 0.75rem;
}

.menu-item a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.menu-item a:hover {
    color: white;
}

.copyright-text {
    margin: 0;
    padding: 1rem 0;
    color: white;
    background-color: #1671e9;
    font-size: 0.875rem;
    text-align: center;
    position: relative;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--background-color);
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-lg);
        display: none;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
        padding: 0.75rem 0;
    }

    .nav-link::after {
        display: none;
    }

    .page-title {
        font-size: 2rem;
    }

    .page-subtitle {
        font-size: 1.125rem;
    }

    .content-card {
        padding: 1.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* FAQ Styling - Modern Accordion */
.faq-item {
    margin-bottom: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: var(--cyan);
    box-shadow: 0 4px 12px rgba(154, 73, 170, 0.15);
}

.faq-question {
    color: white;
    padding: 1.25rem 3.5rem 1.25rem 1.5rem;
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: color 0.2s ease;
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
}

.faq-question:hover {
    color: var(--cyan);
}

.faq-question::after {
    content: '▼';
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.25rem;
    font-weight: 700;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question::after {
    content: '▲';
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: var(--white);
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    color: var(--text-secondary);
    line-height: 1.8;
    padding: 0rem 1.5rem 0 1.5rem;
}

.faq-answer p:last-child {
    padding-bottom: 1.5rem;
}

.faq-answer a {
    color: var(--cyan);
    text-decoration: none;
    font-weight: 600;
}

.faq-answer a:hover {
    text-decoration: underline;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

/* Kids UI / Animations */
.floating-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: 10;
    pointer-events: none;
}

.floating-icon {
    position: absolute;
    opacity: 0.15;
    animation: floatUp 15s linear infinite;
    width: 60px;
    height: 60px;
    background-size: contain;
    background-repeat: no-repeat;
}

@keyframes floatUp {
    0% {
        transform: translateY(110vh) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 0.2;
    }

    90% {
        opacity: 0.2;
    }

    100% {
        transform: translateY(-10vh) rotate(360deg);
        opacity: 0;
    }
}

/* Hover Effects for Cards */
.card,
.content-card,
.blook-card {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.27), box-shadow 0.3s ease;
}

.card:hover,
.content-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.blook-card:hover {
    transform: scale(1.1) rotate(2deg);
    z-index: 10;
}

/* Rarity Icon in Text */
.inline-rarity-icon {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-right: 5px;
    border-radius: 4px;
}

/* =========================================
   KID-FRIENDLY & ANIMATION ENHANCEMENTS
   ========================================= */

/* Rainbow Title Animation */
.page-title {
    /* background: linear-gradient(90deg, #ff4d4d, #f9cb28, #4dff4d, #4da6ff, #9933ff);
    background-size: 200% auto;
    -webkit-background-clip: text; */
    /* background-clip: text; */
    /* color: transparent; */
    animation: shine 4s linear infinite;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.1);
    /* Subtle shadow behind text? No, clip hides it. */
    /* Fallback for old browsers if needed, but modern support is good */
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

/* Card Entrance Animations */
.content-card,
.card {
    opacity: 0;
    animation: slideUpEntrance 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.content-card:nth-child(1) {
    animation-delay: 0.1s;
}

.content-card:nth-child(2) {
    animation-delay: 0.2s;
}

.content-card:nth-child(3) {
    animation-delay: 0.3s;
}

.content-card:nth-child(4) {
    animation-delay: 0.4s;
}

.content-card:nth-child(5) {
    animation-delay: 0.5s;
}

@keyframes slideUpEntrance {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }

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

/* Button & Interactive Bounce */
.btn-primary:hover,
.btn-secondary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.btn-primary:active,
.btn-secondary:active {
    transform: translateY(-1px) scale(0.95);
}

/* Pulse Animation for Primary Actions */
#calculate-btn,
#simulate-btn {
    animation: softPulse 2s infinite;
}

@keyframes softPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(74, 137, 220, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(74, 137, 220, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(74, 137, 220, 0);
    }
}

/* =========================================
   ENHANCED POPUP / MODAL STYLES
   ========================================= */

/* Bouncy Entrance Animation */
@keyframes modalPop {
    0% {
        transform: scale(0.5) translateY(100px);
        opacity: 0;
    }

    70% {
        transform: scale(1.05) translateY(-10px);
        opacity: 1;
    }

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

#results-modal.active .modal-content {
    animation: modalPop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.27) forwards;
}

/* To ensure animation triggers, we might need JS to toggle a class or just rely on display block. 
   If display:none -> block, animation works if on the element. */
.modal-content {
    animation: modalPop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.27) forwards;

    /* Fun Styling */
    border: 6px solid #4a89dc;
    /* Blooket Blue */
    border-radius: 30px;
    box-shadow: 0 0 0 10px rgba(74, 137, 220, 0.3), 0 25px 50px rgba(0, 0, 0, 0.4);
    overflow: visible;
    /* Show the close button bounding box if it pops out */
}

/* Rainbow Glow Border Option */
.modal-content {
    position: relative;
    background-clip: padding-box;
    /* Ensure border is visible */
    border: 6px solid transparent;
    /* Transparent for gradient? No, solid color is better for kids style. */
    border-color: #3bafda;
}

/* Big Fun Close Button */
.close-modal {
    position: absolute;
    top: 0;
    right: 0;
    background: #da4453;
    /* Red */
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 900;
    border: 4px solid white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 100;
    opacity: 1;
}

.close-modal:hover {
    transform: scale(1.15) rotate(180deg);
    background: #e9573f;
    box-shadow: 0 8px 20px rgba(233, 87, 63, 0.4);
}

.close-modal:active {
    transform: scale(0.9);
}

/* Modal Backdrop Blur */
.modal-overlay {
    backdrop-filter: blur(8px);
    background: rgba(0, 0, 0, 0.6);
}

/* =========================================
   SCROLLING FIX FOR MODAL
   ========================================= */

/* Make the modal a flex container so header stays fixed and body scrolls */
#results-modal.active .modal-content,
.modal-content {
    display: flex;
    flex-direction: column;
    max-height: 85vh;
    /* Increase safety margin */
}

.results-header {
    flex-shrink: 0;
    /* Header won't shrink */
}

#modal-results-body {
    flex: 1;
    /* Takes remaining space */
    overflow-y: auto;
    /* Scrollable */
    min-height: 0;
    /* Firefox flex fix */
    padding: 1rem;
    padding-right: 0.5rem;
    /* Avoid scrollbar overlap */

    /* Smooth Scroll */
    scroll-behavior: smooth;
}

/* Custom Kid-Friendly Scrollbar */
#modal-results-body::-webkit-scrollbar {
    width: 12px;
}

#modal-results-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

#modal-results-body::-webkit-scrollbar-thumb {
    background: #4a89dc;
    border-radius: 10px;
    border: 3px solid #f1f1f1;
}

#modal-results-body::-webkit-scrollbar-thumb:hover {
    background: #3bafda;
}

/* Ensure grid doesn't break layout */
.results-bottom-row {
    margin-bottom: 2rem;
}

/* =========================================
   CSS-BASED RARITY ICONS (Reliable & Sharp)
   ========================================= */
.rarity-icon-css {
    display: inline-block;
    width: 22px;
    height: 22px;
    margin-right: 8px;
    vertical-align: text-bottom;
    position: relative;
    top: -1px;
}

/* Uncommon: Triangle (Green) */
.rarity-icon-css.uncommon {
    background-color: #8cc152;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

/* Rare: Diamond (Blue) */
.rarity-icon-css.rare {
    background-color: #4a89dc;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    transform: scale(0.9);
}

/* Epic: Pentagon (Red) */
.rarity-icon-css.epic {
    background-color: #da4453;
    clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
}

/* Legendary: Star (Gold) */
.rarity-icon-css.legendary {
    background-color: #f6bb42;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

/* Chroma: Star (Teal) + Spin */
.rarity-icon-css.chroma {
    background-color: #0bc2cf;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    animation: softPulse 2s infinite;
    /* Don't spin, might be distracting to read. Pulse is nice. */
}

/* Mystical: Hexagon (Purple) */
.rarity-icon-css.mystical {
    background-color: #967adc;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
}

/* Tooltip for Blook Stats */
.blook-tooltip {
    visibility: hidden;
    width: 220px;
    background-color: #ffffff;
    color: #333;
    text-align: left;
    border-radius: 12px;
    padding: 12px;
    position: absolute;
    z-index: 100;
    top: 110%;
    /* Show below */
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border: 3px solid var(--primary);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    font-size: 0.9rem;
}

.blook-tooltip::after {
    content: "";
    position: absolute;
    bottom: 100%;
    /* Arrow at top pointing up */
    left: 50%;
    margin-left: -8px;
    border-width: 8px;
    border-style: solid;
    border-color: transparent transparent var(--primary) transparent;
}

.blook-item:hover .blook-tooltip {
    visibility: visible;
    opacity: 1;
}

.tooltip-stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-size: 0.85rem;
}

.tooltip-stat-label {
    font-weight: 700;
    color: #666;
}

.tooltip-stat-value {
    font-weight: 800;
    color: var(--primary);
}

* {
    box-sizing: border-box;
}

.value-guide-page {
    min-height: 100vh;
    padding: 2rem 0;
}

.page-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.page-title {
    font-family: 'Titan One', sans-serif;
    font-size: 4rem !important;
    color: white;
    text-shadow: 4px 4px 0px rgba(0, 0, 0, 0.2);
    margin-bottom: 1rem;
}

.page-subtitle {
    font-size: 1.8rem;
    color: white;
    font-weight: 700;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.1);
}

/* Pack Grid */
.packs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 2rem;
    padding: 0 1rem;
}

.value-pack-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 0 rgba(0, 0, 0, 0.2),
        0 12px 24px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.value-pack-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

.value-pack-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 16px 0 rgba(0, 0, 0, 0.2),
        0 20px 40px rgba(0, 0, 0, 0.25);
}

.value-pack-card:active {
    transform: translateY(-5px) scale(1.02);
}

.pack-image-wrapper {
    position: relative;
    z-index: 1;
    rotate: 20deg;
    padding: 20px;
}

.pack-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    animation: float 3s ease-in-out infinite;
}

.pack-title {
    font-family: 'Titan One', sans-serif;
    font-size: 1.8rem;
    color: white;
    text-shadow: 3px 3px 0px rgba(0, 0, 0, 0.3);
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    display: none;
}

.pack-price {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgb(0 0 0 / 57%);
    padding: 4px 20px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 900;
    color: #ffffff;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.1);
    position: absolute;
    z-index: 1;
    bottom: 10px;
    left: 10px;
}

.token-small {
    width: 32px;
    height: 32px;
}

/* Modal Styles */
.blooks-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3000;
    animation: fadeIn 0.3s ease;
}

.blooks-modal.active {
    display: block;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    margin: 0;
    background: white;
    border-radius: 0;
    box-shadow: none;
    border: none;
    overflow: hidden;
    animation: slideDown 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 50px;
    height: 50px;
    background: #ff4757;
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 4px 0 #d63447,
        0 6px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
}

.modal-close-btn:hover {
    background: #ee5a6f;
    transform: scale(1.1);
}

.modal-close-btn:active {
    transform: translateY(4px) scale(1.05);
    box-shadow: 0 2px 0 #d63447,
        0 4px 8px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background: linear-gradient(135deg, #0bc2cf 0%, #31aae0 100%);
    padding: 1.5rem 2rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.modal-pack-name {
    font-family: 'Titan One', sans-serif;
    font-size: 2.5rem;
    color: white;
    text-shadow: 3px 3px 0px rgba(0, 0, 0, 0.2);
    margin: 0;
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
    height: calc(100vh - 120px);
    overflow: hidden;
}


/* Blooks Grid in Modal */
.modal-blooks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
    align-content: start;
}

.blook-card {
    background: white;
    border: 3px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blook-card:hover {
    transform: scale(0.95);
    border-color: #0bc2cf;
    box-shadow: 0 4px 12px rgba(11, 194, 207, 0.3);
}

.blook-card.selected {
    border-color: #0bc2cf;
    background: linear-gradient(135deg, #e0f7fa 0%, #b2ebf2 100%);
    box-shadow: 0 0 0 4px rgba(11, 194, 207, 0.3);
    transform: scale(0.95);
}

.blook-card-img {
    width: 100%;
    height: 100%;
    max-width: 80px;
    max-height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.blook-card-name {
    display: none;
}

.blook-rarity-badge {
    display: none;
}

/* Rarity Colors */
.rarity-uncommon {
    background: #8cc152;
}

.rarity-rare {
    background: #4a89dc;
}

.rarity-epic {
    background: #967adc;
}

.rarity-legendary {
    background: #f6bb42;
}

.rarity-chroma {
    background: linear-gradient(135deg, #da4453 0%, #f6bb42 50%, #4a89dc 100%);
}

.rarity-mystical {
    background: linear-gradient(135deg, #967adc 0%, #da4453 100%);
}

/* Blook Details Panel */
.blook-details-panel {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 16px;
    padding: 1.5rem;
    border: 4px solid #cbd5e1;
    height: fit-content;
    overflow-y: auto;
}

.pack-title .blook-details-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 1.8rem;
    color: #94a3b8;
    font-weight: 700;
    text-align: center;
}

.blook-details-content {
    animation: fadeIn 0.3s ease;
}

.blook-details-header {
    text-align: center;
}

.blook-details-img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin: 0 auto 0;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.12));
    animation: bounce 2s ease infinite;
}

.blook-details-name {
    font-family: 'Titan One', sans-serif;
    font-size: 1.8rem;
    color: #3a3a3a;
    margin-bottom: 0.8rem;
    line-height: 1.2;
}

.blook-details-rarity {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    color: white;
    font-weight: 900;
    font-size: 1rem;
    text-transform: uppercase;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.2);
    margin-bottom: 1.5rem;
}

.stats-grid {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.stat-box {
    border-bottom: 3px solid #e2e8f0;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
    padding: 0 10px 0 10px;
}

.stat-box:hover {
    transform: translateX(5px);
    border-color: #0bc2cf;
    box-shadow: 0 4px 12px rgba(11, 194, 207, 0.2);
}

.stat-label {
    font-weight: 800;
    font-size: 1.2rem;
    color: #64748b;
}

.stat-value {
    font-weight: 900;
    font-size: 1.5rem;
    color: #0bc2cf;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-value img {
    width: 24px;
    height: 24px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-100px) scale(0.8);
    }

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

@keyframes bounce-in {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }

    50% {
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.9);
    }

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

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

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

@keyframes float {

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

    50% {
        transform: translateY(-10px);
    }
}

@keyframes bounce {

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

    50% {
        transform: translateY(-20px);
    }
}

.bounce-in {
    animation: bounce-in 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fade-in-up {
    animation: fade-in-up 0.6s ease forwards;
    opacity: 0;
}

/* Responsive Design */
@media (max-width: 968px) {
    .modal-body {
        grid-template-columns: 1fr;
        grid-template-rows: 50vh 50vh;
        height: calc(100vh - 100px);
        padding: 1rem;
        gap: 0;
    }

    .modal-blooks-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 0.75rem;
        overflow-y: auto;
        padding-bottom: 1rem;
    }

    .blook-details-panel {
        position: static;
        height: 100%;
        overflow-y: auto;
        margin-top: 1rem;
        border-top: 4px solid #0bc2cf;
    }

    .page-title {
        font-size: 2.8rem !important;
    }

    .packs-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1.5rem;
    }

    .pack-image-wrapper {
        padding: 0;
    }

    .modal-container {
        width: 100vw;
        height: 100vh;
    }

    .modal-header {
        padding: 1rem;
    }

    .modal-pack-name {
        font-size: 2rem;
    }
}

@media (max-width: 640px) {
    .page-title {
        font-size: 2.2rem !important;
    }

    .page-subtitle {
        font-size: 1.3rem;
    }

    .packs-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .modal-pack-name {
        font-size: 2rem;
    }

    .blook-details-name {
        font-size: 2rem;
    }
}

/* ============================================
   TOKEN GRINDER CALCULATOR
   ============================================ */

.grinder-calc-row {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    margin-top: 1.5rem;
}

.grinder-calc-row .input-group {
    flex: 1;
}

.grinder-calc-row .btn {
    height: fit-content;
}

/* Progress Bar */
.token-progress-wrap {
    margin-top: 1.5rem;
}

.token-progress-label {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.token-progress-bar {
    height: 20px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.token-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0bc2cf, #1671e9);
    border-radius: 10px;
    transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Grind Results Grid */
.grind-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.grind-result-card {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.grind-result-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.grind-result-card.grind-best {
    border-color: #0bc2cf;
    background: linear-gradient(135deg, rgba(11, 194, 207, 0.05), rgba(22, 113, 233, 0.05));
    box-shadow: 0 4px 12px rgba(11, 194, 207, 0.15);
}

.grind-best-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #0bc2cf, #1671e9);
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 3px 12px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

.grind-result-emoji {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.grind-result-name {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.grind-result-time {
    font-size: 1.6rem;
    font-weight: 900;
    color: #0bc2cf;
    margin-bottom: 0.25rem;
}

.grind-result-detail {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Gamemode Comparison Table */
.table-responsive {
    overflow-x: auto;
    margin-top: 1rem;
}

.grind-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.95rem;
}

.grind-table thead th {
    background: #9a49aa;
    color: white;
    font-weight: 700;
    padding: 0.85rem 1rem;
    text-align: left;
    white-space: nowrap;
}

.grind-table thead th:first-child {
    border-radius: 10px 0 0 0;
}

.grind-table thead th:last-child {
    border-radius: 0 10px 0 0;
}

.grind-table tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
}

.grind-table tbody tr:hover {
    background: rgba(11, 194, 207, 0.04);
}

.grind-row-best {
    background: rgba(11, 194, 207, 0.06) !important;
}

.grind-row-best td {
    font-weight: 800;
    color: #0bc2cf;
}

.grind-row-best td:first-child {
    color: var(--text-primary);
}

.gm-badge {
    display: inline-block;
    margin-right: 0.35rem;
    font-size: 1.1rem;
}

.diff-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
}

.diff-easy {
    background: #10b981;
}

.diff-medium {
    background: #f59e0b;
}

.diff-hard {
    background: #ef4444;
}

/* Step Cards */
.grind-steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.grind-step {
    position: relative;
    padding-top: 3rem !important;
}

.grind-step-num {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #9a49aa, #b563c7);
    color: white;
    font-weight: 900;
    font-size: 1.3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(154, 73, 170, 0.3);
}

kbd {
    background: #f1f5f9;
    border: 1px solid #d1d5db;
    border-bottom: 3px solid #d1d5db;
    border-radius: 5px;
    padding: 2px 8px;
    font-family: 'Nunito', monospace;
    font-weight: 700;
    font-size: 0.9em;
}

/* ============================================
   GUESS THE BLOOK GAME
   ============================================ */

.gtb-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    align-items: start;
}

.gtb-game-col {
    min-width: 0;
}

.gtb-stats-col {
    position: sticky;
    top: 80px;
}

/* Difficulty Buttons */
.gtb-diff-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.gtb-diff-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 1rem !important;
    background: #f8fafc !important;
    border: 3px solid #e2e8f0 !important;
    border-radius: 16px !important;
    transition: all 0.25s ease !important;
    box-shadow: none !important;
    cursor: pointer;
}

.gtb-diff-btn:hover {
    transform: translateY(-4px) !important;
}

.gtb-diff-easy:hover {
    border-color: #10b981 !important;
    background: rgba(16, 185, 129, 0.05) !important;
}

.gtb-diff-medium:hover {
    border-color: #f59e0b !important;
    background: rgba(245, 158, 11, 0.05) !important;
}

.gtb-diff-hard:hover {
    border-color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.05) !important;
}

.gtb-diff-expert:hover {
    border-color: #8b5cf6 !important;
    background: rgba(139, 92, 246, 0.05) !important;
}

.gtb-diff-icon {
    font-size: 2.5rem;
}

.gtb-diff-label {
    font-weight: 800 !important;
    font-size: 1.2rem !important;
    color: var(--text-primary) !important;
}

.gtb-diff-desc {
    font-size: 0.85rem !important;
    color: var(--text-secondary) !important;
    font-weight: 600 !important;
}

/* Game Play Area */
.gtb-round-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.gtb-diff-tag {
    background: #9a49aa;
    color: white;
    padding: 4px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
}

.gtb-streak-tag {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text-primary);
}

/* Canvas */
.gtb-canvas-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
    position: relative;
}

#blookCanvas {
    border-radius: 16px;
    border: 3px solid #e2e8f0;
    background: #f0f4f8;
    max-width: 100%;
    height: auto;
}

.gtb-feedback {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 5rem;
    font-weight: 900;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.27), opacity 0.3s;
    opacity: 0;
    z-index: 10;
}

.gtb-feedback-correct {
    color: #10b981;
    transform: translate(-50%, -50%) scale(1) !important;
    opacity: 1 !important;
}

.gtb-feedback-wrong {
    color: #ef4444;
    transform: translate(-50%, -50%) scale(1) !important;
    opacity: 1 !important;
}

/* Options */
.gtb-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.gtb-option-btn {
    padding: 1rem;
    background: white;
    border: 3px solid #e2e8f0;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: 'Nunito', sans-serif;
    color: var(--text-primary);
}

.gtb-option-btn:hover:not(:disabled) {
    border-color: #9a49aa;
    background: rgba(154, 73, 170, 0.04);
    transform: translateY(-2px);
}

.gtb-option-btn.gtb-correct {
    border-color: #10b981 !important;
    background: rgba(16, 185, 129, 0.1) !important;
    color: #059669 !important;
}

.gtb-option-btn.gtb-wrong {
    border-color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.1) !important;
    color: #dc2626 !important;
}

.gtb-option-btn:disabled {
    cursor: default;
    opacity: 0.8;
}

/* Reveal */
.gtb-after {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gtb-reveal-wrap {
    text-align: center;
}

.gtb-reveal-img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 12px;
    animation: gtbPopIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.27);
}

.gtb-reveal-name {
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--text-primary);
}

@keyframes gtbPopIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }

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

/* Stats Card */
.gtb-stats-card h3 {
    font-size: 1.3rem !important;
    margin-bottom: 1rem;
}

.gtb-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.gtb-stat-box {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.75rem;
    text-align: center;
}

.gtb-stat-value {
    font-size: 1.8rem;
    font-weight: 900;
    color: #0bc2cf;
    line-height: 1.2;
}

.gtb-stat-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Accuracy Bar */
.gtb-accuracy-bar-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.gtb-accuracy-label {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.gtb-accuracy-bar {
    flex: 1;
    height: 10px;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}

.gtb-accuracy-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #0bc2cf);
    border-radius: 6px;
    transition: width 0.5s ease;
}

.gtb-accuracy-pct {
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--text-primary);
    min-width: 35px;
    text-align: right;
}

/* Shake Animation */
@keyframes gtbShake {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-8px);
    }

    40% {
        transform: translateX(8px);
    }

    60% {
        transform: translateX(-5px);
    }

    80% {
        transform: translateX(5px);
    }
}

.gtb-shake {
    animation: gtbShake 0.5s ease;
}

/* Responsive */
@media (max-width: 900px) {
    .gtb-layout {
        grid-template-columns: 1fr;
    }

    .gtb-stats-col {
        position: static;
    }

    .grinder-calc-row {
        flex-direction: column;
    }

    .grinder-calc-row .btn {
        width: 100%;
    }

    .grind-results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .gtb-diff-buttons {
        grid-template-columns: repeat(2, 1fr);
    }

    .gtb-options {
        grid-template-columns: 1fr;
    }

    .grind-results-grid {
        grid-template-columns: 1fr;
    }

    .grind-steps-grid {
        grid-template-columns: 1fr;
    }
}

/* Background Flashes for Guess Game */
.flash-correct::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background: radial-gradient(circle at center, rgba(16, 185, 129, 0.4), transparent);
    animation: bgFlash 0.35s ease-in-out;
}

.flash-wrong::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background: radial-gradient(circle at center, rgba(239, 68, 68, 0.4), transparent);
    animation: bgFlash 0.35s ease-in-out;
}

@keyframes bgFlash {
    0% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

/* Falling Blook */
.falling-blook {
    position: fixed;
    pointer-events: none;
    z-index: 99999;
    will-change: transform;
    transform: translateZ(0);
}

/* Token Grinder Dynamic UI */
.tg-bgBlooks {
    position: fixed;
    z-index: 0;
    width: 200%;
    height: 200%;
    top: 50%;
    left: 50%;
    background-size: 1200px;
    background-position: 0 0;
    opacity: 0.1;
    transform: translate(-50%, -50%) rotate(15deg);
    background-image: url('https://ac.blooket.com/@codeblooket/blooket-frontend-components/v0.2.35/assets/BlookCheckers-e975c505.png');
    pointer-events: none;
    animation: bgScroll 30s linear infinite;
}

.tg-mainContent {
    display: flex;
    flex-direction: row;
    gap: 20px;
    padding: 20px 0;
    flex: 1;
    padding-top: 0;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    z-index: 1;
    position: relative;
}

@media (max-width: 800px) {
    .tg-mainContent {
        flex-direction: column;
    }
}

.tg-selectionContainer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    border: 6px solid rgb(255, 255, 255, 0.2);
    border-radius: 10px;
    background-color: #9a49aa;
    color: #ffffff;
    align-items: center;
    flex: 1;
    padding: 20px;
}

.tg-resultsContainer {
    display: flex;
    flex-direction: column;
    gap: 15px;
    color: #444;
    align-items: left;
    flex: 1;
    background-color: rgb(0, 0, 0, 0);
    padding: 0px;
}

.tg-resultsSubContainer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: var(--primary);
    border-radius: 10px;
    padding: 20px;
}

.tg-resultsSubContainer:last-child {
    flex: 1;
}

.tg-subTitle {
    font-size: 2.2rem;
    font-family: 'Titan One', cursive;
    text-align: center;
    color: white;
    user-select: none;
    align-items: center;
    justify-content: center;
    display: flex;
    text-shadow: 4px 4px rgb(0, 0, 0, 0.2);
    margin: 0;
    padding-bottom: 5px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.tg-thumbnail {
    height: 200px;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 10px;
    transition: transform 0.2s ease, background-color 0.2s ease;
    cursor: pointer;
    object-fit: contain;
}

.tg-thumbnail:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(0.95);
}

.tg-thumbnail:active {
    transform: scale(0.9);
}

.tg-stats {
    display: flex;
    flex-direction: column;
    gap: 14px;
    color: white;
    text-align: left;
    font-family: 'Nunito', sans-serif;
    font-size: 1.5rem;
    padding: 10px 0;
    text-shadow: 2px 2px rgb(0, 0, 0, 0.2);
}

.tg-statRow {
    display: flex;
    align-items: center;
    gap: 15px;
}

.tg-tokenContainer {
    display: flex;
    flex-direction: row;
    gap: 15px;
    align-items: center;
    justify-content: center;
    padding: 10px;
    font-family: 'Nunito', sans-serif;
    font-size: 1.8rem;
    font-weight: bold;
}

.tg-tokenSubContainer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    transition: 0.1s ease;
}

.tg-tokenSubContainer:hover,
.tg-tokenSubContainer:focus-within {
    background-color: rgba(255, 255, 255, 0.25);
}

#tg-tokenAmount {
    padding: 0.1rem;
    background: transparent;
    border: none;
    color: white;
    font-size: 2rem;
    font-family: 'Nunito', sans-serif;
    outline: none;
}

#tg-tokenAmount::-webkit-outer-spin-button,
#tg-tokenAmount::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.tg-tokenImg {
    width: 40px;
    height: 40px;
    filter: drop-shadow(4px 4px rgba(0, 0, 0, 0.2));
}

.tg-modeSwitch {
    position: relative;
    display: flex;
    width: 100%;
    max-width: 400px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    overflow: hidden;
    font-family: 'Nunito', sans-serif;
    font-size: 1.2rem;
    transition: 0.1s ease;
    margin: 10px auto;
}

.tg-modeSwitch:hover {
    background: rgba(255, 255, 255, 0.25);
}

.tg-modeOption {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    z-index: 2;
    user-select: none;
    transition: 0.25s ease;
}

.tg-modeHighlight {
    position: absolute;
    width: 50%;
    height: 100%;
    left: 0;
    background: white;
    border-radius: 8px;
    transition: 0.25s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tg-modeOption.active {
    color: var(--primary);
    font-weight: bold;
}

.tg-gradeSquare {
    width: 28px;
    height: 22px;
    border-radius: 4px;
    --bg: #1e92ff;
    background: var(--bg);
    box-shadow: 0 6px color-mix(in srgb, var(--bg) 80%, black), 0 8px rgba(0, 0, 0, 0.1);
    position: relative;
    top: -2px;
}

.tg-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.tg-modalContent {
    width: 100%;
    max-width: 700px;
    max-height: 80vh;
    background: var(--primary);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    overflow-y: auto;
}

.tg-strategyModal {
    max-width: 1000px;
    text-align: center;
    align-items: center;
    color: white;
    font-family: 'Nunito', sans-serif;
    font-size: 1.2rem;
}

.tg-strategyContent {
    width: 100%;
    display: flex;
    flex-direction: row;
    gap: 20px;
    text-align: left;
}

@media (max-width: 800px) {
    .tg-strategyContent {
        flex-direction: column;
    }
}

.tg-strategy {
    flex: 1;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    transition: 0.1s ease;
}

.tg-strategy h2 {
    margin-top: 0;
    font-size: 1.5rem;
    text-align: center;
}

.tg-strategy:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.tg-modalTitle {
    font-family: 'Titan One', cursive;
    font-size: 2.5rem;
    color: white;
    text-align: center;
    text-shadow: 3px 3px rgba(0, 0, 0, 0.2);
}

#tg-gamemodeGrid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

@media (max-width: 600px) {
    #tg-gamemodeGrid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.tg-modalThumb {
    width: 100%;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    transition: 0.2s;
    cursor: pointer;
    object-fit: contain;
}

.tg-modalThumb:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(0.95);
}

.tg-maxAlert {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    font-family: 'Nunito', sans-serif;
    text-align: center;
    display: none;
    background: rgba(239, 68, 68, 0.6);
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
}

.tg-strategyButton,
.tg-quickPlayButton {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 12px 20px;
    font-size: 1.4rem;
    font-family: 'Nunito', sans-serif;
    cursor: pointer;
    transition: 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 0 10px;
}

.tg-strategyButton:hover,
.tg-quickPlayButton:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-4px);
    text-decoration: none;
    color: white;
}

.tg-strategyButton:active,
.tg-quickPlayButton:active {
    transform: translateY(0);
}

.tg-description {
    margin-top: auto;
    color: white;
    font-family: 'Nunito', sans-serif;
    font-size: 1.1rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.1);
    padding: 15px;
    border-radius: 8px;
    line-height: 1.5;
}