/* wordle.css — celikezor wordle oyunu stilleri */
/* Template: templates/data_manager/casino/wordle.html'den çıkarıldı */

@media (max-width: 1200px) {
    .app-container {
        display: flex !important;
        flex-direction: column !important;
        height: calc(100vh - 64px) !important;
        height: calc(100dvh - 64px) !important;
        overflow: hidden !important;
        padding: 0.5rem !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
}

.wordle-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: min(10px, 1.5vh) 0.5rem;
    box-sizing: border-box;
    height: 100%;
    max-height: 100%;
    justify-content: space-between;
    overflow: hidden;
    position: relative;
}

.wordle-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding-bottom: min(4px, 0.6vh);
    border-bottom: 1px solid rgba(0, 210, 255, 0.15);
    margin-bottom: min(8px, 1vh);
}

.wordle-title {
    font-size: min(1.8rem, 3.8vh);
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--accent-hover);
    text-transform: uppercase;
    margin: 0 auto;
}

.wordle-board {
    display: flex;
    flex-direction: column;
    gap: min(5px, 0.7vh);
    padding: min(2px, 0.3vh);
    margin-bottom: min(6px, 0.8vh);
}

.wordle-row {
    display: flex;
    gap: min(5px, 0.7vh);
}

.wordle-tile {
    width: min(54px, 5.8vh, 12vw);
    height: min(54px, 5.8vh, 12vw);
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: min(1.4rem, 2.8vh, 5.8vw);
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    transition: border-color 0.1s;
    background: transparent;
    user-select: none;
    position: relative;
}

.wordle-tile.filled {
    border-color: rgba(255, 255, 255, 0.4);
    animation: wTilePop 0.1s ease;
}

@keyframes wTilePop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.12);
    }

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

.wordle-tile.correct {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #000;
    box-shadow: 0 0 12px #00d2ff66;
    animation: wFlip 0.5s ease forwards;
}

.wordle-tile.present {
    background: #2a6b94;
    border-color: #2a6b94;
    box-shadow: 0 0 10px rgba(42, 107, 148, 0.35);
    animation: wFlip 0.5s ease forwards;
}

.wordle-tile.absent {
    background: #3a3a3c;
    border-color: #3a3a3c;
    animation: wFlip 0.5s ease forwards;
}

@keyframes wFlip {
    0% {
        transform: rotateX(0deg);
    }

    50% {
        transform: rotateX(-90deg);
    }

    100% {
        transform: rotateX(0deg);
    }
}

.wordle-tile.shake {
    animation: wShake 0.5s ease;
}

@keyframes wShake {

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

    20%,
    60% {
        transform: translateX(-4px);
    }

    40%,
    80% {
        transform: translateX(4px);
    }
}

.wordle-tile.bounce {
    animation: wBounce 0.6s ease;
}

@keyframes wBounce {

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

    40% {
        transform: translateY(-16px);
    }

    60% {
        transform: translateY(-8px);
    }
}

/* Wordle Keyboard */
.wordle-keyboard {
    display: flex;
    flex-direction: column;
    gap: min(5px, 0.7vh);
    padding: 0.2rem 0.4rem;
    width: 100%;
    margin-top: auto;
}

.wordle-kb-row {
    display: flex;
    gap: min(4px, 1vw);
    justify-content: center;
}

.wordle-key {
    height: min(50px, 5.2vh);
    min-width: min(34px, 7.5vw);
    padding: 0 2px;
    border-radius: 6px;
    border: none;
    background: #818384;
    color: #fff;
    font-size: min(0.8rem, 1.8vh, 3.5vw);
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.1s;
    font-family: inherit;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.wordle-key:hover {
    background: #909293;
}

.wordle-key:active {
    transform: scale(0.94);
}

.wordle-key.wide {
    min-width: min(52px, 11.5vw);
    font-size: min(0.7rem, 1.5vh, 2.8vw);
}

.wordle-key.correct {
    background: var(--accent-hover);
    color: #000;
    box-shadow: 0 0 8px #00d2ff59;
}

.wordle-key.present {
    background: #2a6b94;
    color: #fff;
}

.wordle-key.absent {
    background: #3a3a3c;
    color: #777;
}

.wordle-message {
    display: none;
    /* Controlled by JS */
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: rgba(231, 76, 60, 0.15);
    /* Sleek translucent dark red instead of solid bright red */
    color: #ff5252;
    border: 1px solid rgba(231, 76, 60, 0.35);
    font-weight: 600;
    padding: min(8px, 1vh) min(16px, 3.5vw);
    border-radius: 8px;
    font-size: min(0.85rem, 1.8vh, 3.8vw);
    width: calc(100% - 1rem);
    max-width: 480px;
    box-sizing: border-box;
    text-align: center;
    margin: 0 auto min(6px, 1vh) auto;
    animation: wSlideUp 0.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
}

.wordle-message.info {
    background: rgba(0, 210, 255, 0.1);
    color: var(--accent-hover);
    border-color: #00d2ff4d;
}

.wordle-message.success {
    background: rgba(0, 210, 255, 0.08);
    color: var(--accent-hover);
    border-color: rgba(0, 210, 255, 0.3);
}

@keyframes wSlideUp {
    from {
        transform: translateY(8px);
        opacity: 0;
    }

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

.wordle-result-bar {
    width: 100%;
    padding: min(6px, 1vh) min(12px, 3vw);
    border-radius: 8px;
    background: rgba(0, 210, 255, 0.06);
    border: 1px solid rgba(0, 210, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: min(4px, 0.6vh) 0;
    box-sizing: border-box;
}

.wordle-result-bar .next-label {
    font-size: min(0.75rem, 1.6vh);
    color: var(--text-secondary);
}

.wordle-result-bar .next-timer {
    font-size: min(1.1rem, 2.2vh);
    font-weight: 700;
    color: var(--accent-hover);
    font-variant-numeric: tabular-nums;
    margin-top: 2px;
}

#wordle-share-btn {
    cursor: pointer;
    color: var(--accent-hover);
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 6px;
    background: rgba(0, 210, 255, 0.08);
    border: 1px solid rgba(0, 210, 255, 0.2);
    transition: all 0.2s ease;
}

#wordle-share-btn:hover {
    background: var(--accent-hover);
    color: #000;
    border-color: var(--accent-hover);
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.35);
}

/* Info / How-to-play button */
.wordle-info-btn {
    background: none;
    border: none;
    color: var(--accent-hover);
    cursor: pointer;
    font-size: min(1.2rem, 2.4vh);
    padding: 4px 6px;
    border-radius: 50%;
    transition: background 0.2s, transform 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    /* Full site-blue, never dimmed */
    opacity: 1;
}

.wordle-info-btn:hover {
    background: rgba(0, 210, 255, 0.12);
    transform: scale(1.1);
}

/* How-to-play modal overlay — sits above ALL site chrome (strips, nav, etc.) */
.wordle-howto-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: wFadeIn 0.2s ease;
}

@keyframes wFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.wordle-howto-modal {
    background: rgba(10, 14, 26, 0.98);
    border: 1px solid rgba(0, 210, 255, 0.2);
    border-radius: 16px;
    max-width: 400px;
    width: 100%;
    padding: 1.6rem 1.5rem 1.4rem;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 210, 255, 0.08);
    position: relative;
    animation: wSlideUp 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    /* Mobile: scroll if content taller than viewport */
    max-height: 90dvh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,210,255,0.2) transparent;
}
.wordle-howto-modal::-webkit-scrollbar { width: 4px; }
.wordle-howto-modal::-webkit-scrollbar-thumb { background: rgba(0,210,255,0.2); border-radius: 4px; }

.wordle-howto-close {
    position: absolute;
    top: 0.9rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.3rem;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
    line-height: 1;
    padding: 2px 6px;
}

.wordle-howto-close:hover {
    opacity: 1;
}

.wordle-howto-title {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 1rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.wordle-howto-modal p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.wordle-howto-modal p strong {
    color: #e0e0e0;
}

.wordle-howto-examples {
    margin-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    padding-top: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.wordle-howto-example {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.wordle-howto-row {
    display: flex;
    gap: 5px;
}

.wordle-howto-tile {
    width: 36px;
    height: 36px;
    border-radius: 5px;
    border: 2px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    background: transparent;
}

.wordle-howto-tile.correct {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #000;
    box-shadow: 0 0 8px rgba(0, 210, 255, 0.35);
}

.wordle-howto-tile.present {
    background: #2a6b94;
    border-color: #2a6b94;
    box-shadow: 0 0 6px rgba(42, 107, 148, 0.3);
}

.wordle-howto-tile.absent {
    background: #3a3a3c;
    border-color: #3a3a3c;
}

.wordle-howto-caption {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.wordle-howto-caption strong {
    color: var(--accent-hover);
}

.wordle-howto-caption em {
    color: #7ab8d4;
}

/* ── Mobile responsiveness for the how-to modal ── */
@media (max-width: 480px) {
    .wordle-howto-overlay {
        padding: 0.5rem;
        align-items: flex-end; /* Sheet slides up from bottom on mobile */
    }

    .wordle-howto-modal {
        max-width: 100%;
        border-radius: 16px 16px 0 0;
        padding: 1.2rem 1.1rem 1.2rem;
        max-height: 85dvh;
    }

    .wordle-howto-title {
        font-size: 0.65rem;
        letter-spacing: 2px;
    }

    .wordle-howto-modal p {
        font-size: 0.82rem;
    }

    .wordle-howto-tile {
        width: 30px;
        height: 30px;
        font-size: 0.82rem;
    }

    .wordle-howto-caption {
        font-size: 0.75rem;
    }
}
