.elg-wordle {
    
    margin: 24px auto;
    padding: 20px;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    background: linear-gradient(145deg, #f8fafc, #eef2ff);
    color: #172033;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    box-shadow: 0 18px 45px rgba(30, 41, 59, .12);
    box-sizing: border-box;
}
.elg-wordle *, .elg-wordle *::before, .elg-wordle *::after { box-sizing: border-box; }
.elg-wordle [hidden] { display: none !important; }
.elg-wdl-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.elg-wdl-kicker {
    color: #0ea5e9;
    font-size: .76rem;
    font-weight: 800;
    text-transform: uppercase;
}
.elg-wdl-title {
    margin: 2px 0 0;
    color: #312e81;
    font-size: 1.3rem;
    font-weight: 900;
}
.elg-wdl-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #334155;
    font-size: .92rem;
    font-weight: 800;
}
.elg-wdl-stats span {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid #c7d2fe;
    border-radius: 999px;
    background: #fff;
}
.elg-wdl-icon-btn {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #c7d2fe;
    border-radius: 10px;
    background: #fff;
    color: #4338ca;
    cursor: pointer;
}
.elg-wdl-icon-btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.elg-wdl-icon-btn svg path,
.elg-wdl-icon-btn svg line,
.elg-wdl-icon-btn svg circle {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.elg-wdl-setup,
.elg-wdl-play {
    padding: 18px;
    border: 1px solid rgba(199, 210, 254, .9);
    border-radius: 14px;
    background: rgba(255,255,255,.9);
    box-shadow: 0 12px 26px rgba(79, 70, 229, .08);
}
.elg-wdl-label {
    display: block;
    margin-bottom: 8px;
    color: #312e81;
    font-weight: 900;
}
.elg-wdl-input {
    width: 100%;
    min-height: 150px;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #fff;
    color: #172033;
    font: inherit;
    font-weight: 700;
    line-height: 1.5;
    resize: vertical;
    outline: none;
}
.elg-wdl-input:focus,
.elg-wdl-options input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,.17);
}
.elg-wdl-help {
    margin-top: 8px;
    color: #64748b;
    font-size: .88rem;
    font-weight: 700;
}
.elg-wdl-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}
.elg-wdl-options label {
    display: grid;
    gap: 6px;
    color: #334155;
    font-size: .9rem;
    font-weight: 800;
}
.elg-wdl-options input {
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font: inherit;
    font-weight: 800;
    outline: none;
}
.elg-wdl-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 14px;
}
.elg-wdl-btn {
    min-height: 44px;
    padding: 11px 18px;
    border: 0;
    border-radius: 12px;
    background: #e2e8f0;
    color: #334155;
    font: inherit;
    font-size: .95rem;
    font-weight: 900;
    cursor: pointer;
    transition: transform .1s ease, background .2s ease;
}
.elg-wdl-btn-primary {
    background: #4f46e5;
    color: #fff;
}
.elg-wdl-btn:hover:not(:disabled), .elg-wdl-btn:focus-visible:not(:disabled) {
    filter: brightness(.98);
    outline: none;
}
.elg-wdl-btn:active:not(:disabled) { transform: scale(.96); }
.elg-wdl-setup-message,
.elg-wdl-message {
    min-height: 28px;
    margin-top: 12px;
    color: #475569;
    font-weight: 800;
    text-align: center;
}
.elg-wdl-setup-message { color: #dc2626; }
.elg-wdl-message.success { color: #15803d; }
.elg-wdl-message.error { color: #dc2626; }
.elg-wdl-board {
    display: grid;
    grid-template-columns: repeat(var(--word-length), minmax(0, 54px));
    justify-content: center;
    gap: 8px;
    margin: 4px auto 16px;
}
.elg-wdl-cell {
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #172033;
    font-size: 1.35rem;
    font-weight: 900;
    text-transform: uppercase;
    transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.elg-wdl-cell.filled {
    border-color: #64748b;
    animation: elg-wdl-pop .12s ease;
}
.elg-wdl-cell.correct { background: #22c55e; border-color: #16a34a; color: #fff; }
.elg-wdl-cell.present { background: #f59e0b; border-color: #d97706; color: #fff; }
.elg-wdl-cell.absent { background: #64748b; border-color: #475569; color: #fff; }
.elg-wdl-cell.flip { animation: elg-wdl-flip .5s ease both; }
.elg-wdl-board.shake { animation: elg-wdl-shake .36s ease; }
.elg-wdl-keyboard {
    display: grid;
    gap: 7px;
     
    margin: 0 auto;
}
.elg-wdl-key-row {
    display: flex;
    justify-content: center;
    gap: 6px;
}
.elg-wdl-key {
    min-width: 36px;
    min-height: 46px;
    padding: 0 10px;
    border: 0;
    border-radius: 8px;
    background: #cbd5e1;
    color: #172033;
    font: inherit;
    font-size: .88rem;
    font-weight: 900;
    cursor: pointer;
}
.elg-wdl-key.wide { min-width: 68px; }
.elg-wdl-key.correct { background: #22c55e; color: #fff; }
.elg-wdl-key.present { background: #f59e0b; color: #fff; }
.elg-wdl-key.absent { background: #64748b; color: #fff; }
.elg-wordle:fullscreen,
.elg-wordle.is-fullscreen {
    width: 100vw;
    max-width: none;
    min-height: 100vh;
    margin: 0;
    padding: 24px;
    border: 0;
    border-radius: 0;
    overflow: auto;
}
@media (max-width: 560px) {
    .elg-wordle { padding: 14px; }
    .elg-wdl-header { align-items: flex-start; flex-direction: column; }
    .elg-wdl-options { grid-template-columns: 1fr; }
    .elg-wdl-board { gap: 6px; grid-template-columns: repeat(var(--word-length), minmax(0, 42px)); }
    .elg-wdl-cell { font-size: 1.05rem; border-radius: 7px; }
    .elg-wdl-key { min-width: 28px; min-height: 42px; padding: 0 7px; font-size: .78rem; }
    .elg-wdl-key.wide { min-width: 54px; }
}
@keyframes elg-wdl-pop { from { transform: scale(.9); } to { transform: scale(1); } }
@keyframes elg-wdl-flip { 0% { transform: rotateX(0); } 50% { transform: rotateX(90deg); } 100% { transform: rotateX(0); } }
@keyframes elg-wdl-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}
