/* Auto Load More */
.candy-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.candy-auto-loader {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(77, 127, 184, 0.14);
    box-shadow: 0 8px 24px rgba(77, 127, 184, 0.08);
}

.candy-auto-loader span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--candy-primary);
    opacity: 0.35;
    animation: candyAutoLoader 1s infinite ease-in-out;
}

.candy-auto-loader span:nth-child(2) {
    animation-delay: 0.15s;
}

.candy-auto-loader span:nth-child(3) {
    animation-delay: 0.3s;
}

.candy-pagination--loading .candy-auto-loader {
    background: rgba(244, 248, 252, 0.95);
}

@keyframes candyAutoLoader {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.35;
    }
    40% {
        transform: scale(1.15);
        opacity: 1;
    }
}

/* Header Adjustments */
.candy-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 1px 10px rgba(79, 143, 219, 0.08);
    padding: 10px 0;
}

.candy-header__container {
    padding: 0 20px;
    gap: 12px;
}

.candy-header__logo {
    font-size: 24px;
    font-weight: 800;
    flex-shrink: 0;
}

.candy-header__logo-img {
    height: 36px;
}

.candy-header__domain {
    font-size: 18px;
    font-weight: 700;
}

.candy-search {
    max-width: 400px;
    flex: 1;
}

.candy-search__input {
    padding: 12px 44px 12px 18px;
    border-radius: 25px;
    font-size: 14px;
    background: #f8fbff;
    border: 1px solid #d3e5f7;
}

.candy-search__input:focus {
    background: #ffffff;
    border-color: var(--candy-primary);
    box-shadow: 0 0 0 3px rgba(79, 143, 219, 0.1);
}

.candy-search__button {
    width: 34px;
    height: 34px;
    right: 5px;
}

.candy-header__nav {
    flex-shrink: 0;
}

.candy-nav__link {
    padding: 10px 16px;
    border-radius: 25px;
    background: linear-gradient(135deg, rgba(79, 143, 219, 0.1) 0%, rgba(122, 178, 234, 0.1) 100%);
    border: 1px solid rgba(79, 143, 219, 0.15);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.25s ease;
}

.candy-nav__link:hover {
    background: var(--candy-gradient);
    border-color: transparent;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 143, 219, 0.22);
}

.candy-nav__link svg {
    stroke-width: 2.5;
}

@media (max-width: 768px) {
    .candy-header__container {
        flex-wrap: nowrap;
        padding: 0 12px;
        gap: 8px;
        min-height: 52px;
    }

    .candy-header__logo {
        font-size: 0;
        display: flex;
        align-items: center;
        flex-shrink: 0;
    }

    .candy-header__logo-img {
        height: 38px;
        width: auto;
    }

    .candy-header__domain {
        display: none;
    }

    .candy-search {
        order: 0;
        flex: 1 1 auto;
        max-width: none;
        min-width: 0;
        width: auto;
    }

    .candy-search__input {
        width: 100%;
        padding: 10px 42px 10px 16px;
        font-size: 14px;
        height: 42px;
        min-width: 0;
        box-sizing: border-box;
    }

    .candy-search__button {
        width: 34px;
        height: 34px;
        right: 5px;
    }

    .candy-search__button svg {
        width: 18px;
        height: 18px;
    }

    .candy-header__nav {
        flex-shrink: 0;
        display: flex;
        align-items: center;
    }

    .candy-nav__link--icon,
    .candy-nav__link {
        width: 42px;
        height: 42px;
        padding: 0;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .candy-nav__link--icon svg,
    .candy-nav__link svg {
        width: 22px;
        height: 22px;
        flex-shrink: 0;
    }

    .candy-nav__text,
    .candy-nav__link span {
        display: none !important;
    }
}

/* PWA Install */
.pwa-install-btn {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    padding: 13px 20px;
    background: linear-gradient(135deg, #4f8fdb 0%, #7ab2ea 100%);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 14px 32px rgba(79, 143, 219, 0.28);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    z-index: 9999;
    white-space: nowrap;
}

.pwa-install-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(79, 143, 219, 0.35);
}

.pwa-install-btn svg {
    width: 22px;
    height: 22px;
}

.pwa-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.pwa-modal.active {
    display: flex;
}

.pwa-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.62);
}

.pwa-modal-wrapper {
    position: relative;
    z-index: 1;
    width: min(92%, 460px);
}

.pwa-modal-content {
    position: relative;
    padding: 34px 28px 28px;
    border-radius: 28px;
    background: linear-gradient(180deg, #ffffff 0%, #f6fbff 100%);
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22);
    overflow: hidden;
}

.pwa-modal-content::before {
    content: '';
    position: absolute;
    inset: auto -15% 62% auto;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(122, 178, 234, 0.22) 0%, rgba(122, 178, 234, 0) 70%);
}

.pwa-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.92);
    color: #6b7f99;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.pwa-modal-close:hover {
    color: #2b4e72;
}

.modal-visual {
    position: relative;
    z-index: 1;
    text-align: center;
    margin-bottom: 28px;
}

.app-icon-container {
    position: relative;
    width: 96px;
    height: 96px;
    margin: 0 auto 18px;
}

.icon-glow {
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79, 143, 219, 0.22) 0%, rgba(79, 143, 219, 0) 72%);
}

.app-icon-badge {
    position: relative;
    z-index: 1;
    width: 96px;
    height: 96px;
    border-radius: 28px;
    background: linear-gradient(135deg, #4f8fdb 0%, #7ab2ea 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 16px 32px rgba(79, 143, 219, 0.3);
}

.app-name {
    margin: 0 0 8px;
    font-size: 30px;
    line-height: 1.15;
    font-weight: 900;
    color: #2b4e72;
}

.app-tagline {
    margin: 0;
    font-size: 15px;
    color: #6b7f99;
}

.modal-features {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.feature-card {
    padding: 16px 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(79, 143, 219, 0.12);
    box-shadow: 0 10px 24px rgba(79, 143, 219, 0.08);
    text-align: center;
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.gradient-1 {
    background: linear-gradient(135deg, #4f8fdb 0%, #5ea0e6 100%);
}

.gradient-2 {
    background: linear-gradient(135deg, #6aa7eb 0%, #7ab2ea 100%);
}

.gradient-3 {
    background: linear-gradient(135deg, #3f7fd0 0%, #4f8fdb 100%);
}

.feature-card h3 {
    margin: 0 0 6px;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 800;
    color: #2b4e72;
}

.feature-card p {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: #6b7f99;
}

.modal-actions {
    position: relative;
    z-index: 1;
}

.install-button {
    width: 100%;
    padding: 16px 20px;
    border: none;
    border-radius: 18px;
    background: linear-gradient(135deg, #4f8fdb 0%, #7ab2ea 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 16px 32px rgba(79, 143, 219, 0.24);
}

.button-content {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.cancel-button {
    width: 100%;
    margin-top: 10px;
    padding: 14px 18px;
    border-radius: 16px;
    border: 1px solid rgba(79, 143, 219, 0.16);
    background: #fff;
    color: #6b7f99;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

@media (max-width: 768px) {
    .pwa-install-btn {
        right: 1rem;
        bottom: 1rem;
        padding: 11px 16px;
        font-size: 13px;
    }

    .pwa-modal-content {
        padding: 30px 18px 20px;
        border-radius: 24px;
    }

    .modal-features {
        grid-template-columns: 1fr;
    }

    .feature-card {
        text-align: left;
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .feature-icon {
        margin: 0;
        flex-shrink: 0;
    }

    .app-name {
        font-size: 24px;
    }
}

/* Categories Modal Styles */
.candy-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
}

.candy-modal.candy-modal--active {
    display: flex;
}

.candy-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.candy-modal-wrapper {
    position: relative;
    z-index: 1;
    width: 90%;
    max-width: 560px;
    max-height: 80vh;
    animation: candyModalEnter 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes candyModalEnter {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.92);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.candy-modal-content {
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f5faff 100%);
    border-radius: 28px;
    padding: 40px 36px 36px;
    box-shadow:
        0 20px 60px rgba(79, 143, 219, 0.18),
        0 0 0 1px rgba(255, 255, 255, 0.85) inset;
    overflow: hidden;
    max-height: calc(80vh - 40px);
    overflow-y: auto;
}

.candy-modal-content::-webkit-scrollbar {
    width: 8px;
}

.candy-modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.candy-modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3b82f6 0%, #93c5fd 100%);
    border-radius: 4px;
}

.candy-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #64748b;
    z-index: 10;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.candy-modal-close:hover {
    background: #fff;
    color: #3b82f6;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.candy-modal-close svg {
    width: 18px;
    height: 18px;
}

.candy-modal-header {
    text-align: center;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eff6ff;
}

.candy-modal-header h2 {
    font-size: 26px;
    font-weight: 800;
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 50%, #93c5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    letter-spacing: -0.5px;
}

.candy-modal-body .candy-categories {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 0;
    animation: candyFadeIn 0.4s ease-out 0.1s both;
}

.candy-modal-body .candy-category-pill {
    padding: 14px 28px;
    font-size: 15px;
}

@media (max-width: 600px) {
    .candy-modal-wrapper {
        width: 95%;
        max-width: none;
    }

    .candy-modal-content {
        padding: 32px 24px 28px;
        border-radius: 24px;
    }

    .candy-modal-header h2 {
        font-size: 22px;
    }

    .candy-modal-body .candy-category-pill {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* Random Game Button */
.candy-random-game-container {
    display: flex;
    justify-content: center;
}

.candy-random-game-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    margin-top: 5px;
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 50%, #93c5fd 100%);
    color: #fff;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.35);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.candy-random-game-btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 35px rgba(59, 130, 246, 0.5);
}

.candy-random-game-btn:active {
    transform: translateY(-2px) scale(1.02);
}

.candy-random-game-btn .btn-icon {
    font-size: 20px;
    line-height: 1;
    animation: diceShake 2s ease-in-out infinite;
}

@keyframes diceShake {
    0%, 100% {
        transform: rotate(0deg);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: rotate(-10deg);
    }
    20%, 40%, 60%, 80% {
        transform: rotate(10deg);
    }
}

@media (max-width: 600px) {
    .candy-random-game-btn {
        padding: 14px 24px;
        font-size: 15px;
    }

    .candy-random-game-btn .btn-icon {
        font-size: 18px;
    }
}

/* Page Layout */
.wrapper {
    min-height: 100vh;
}

.page {
    padding-top: 20px;
}

.page__container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* SEO Text Block */
.home__text-block {
    background: var(--candy-white);
    border-radius: var(--candy-radius-lg);
    padding: 32px;
    margin: 32px 0;
    box-shadow: var(--candy-shadow);
}

.text-block__content h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--candy-primary);
    margin-bottom: 16px;
}

.text-block__content h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--candy-text);
    margin-top: 24px;
    margin-bottom: 12px;
}

.text-block__content p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--candy-text-light);
    margin-bottom: 12px;
}

.text-block__more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--candy-bg);
    border-radius: 50px;
    color: var(--candy-primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.text-block__more:hover {
    background: var(--candy-primary);
    color: white;
    transform: translateX(4px);
}

@media (max-width: 768px) {
    .page__container {
        padding: 0 12px;
    }

    .home__text-block {
        padding: 20px;
    }

    .text-block__content h1 {
        font-size: 22px;
    }

    .text-block__content h2 {
        font-size: 20px;
    }

    .text-block__content p {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .page__container {
        padding: 0 10px;
    }

    .home__text-block {
        padding: 16px;
        border-radius: 16px;
    }
}

/* =====================================================
   Override legacy styles from style.1.min.css
   ===================================================== */

.container,
.container-top,
.container-bottom,
.grid-box {
    background: transparent !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
}

body {
    background: var(--candy-bg) !important;
    background-image: none !important;
}

.ad-container,
.ad-box,
.ad-title {
    background: transparent !important;
    color: inherit !important;
    border: none !important;
}

.category-item,
.cate-box {
    background: transparent !important;
    border: none !important;
    color: inherit !important;
}

.footer {
    background: transparent !important;
    color: inherit !important;
    border: none !important;
}