@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
    --bg: #F8FAFC; 
    --surface: #FFFFFF; 
    --text-main: #334155; 
    --text-muted: #64748B;
    --border: #E2E8F0; 
    --accent: #4F46E5; 
    --accent-hover: #4338CA;
    --focus-ring: rgba(79, 70, 229, 0.12); 
    --danger: #EF4444;
    --preview-color: #94A3B8;
}

html { 
    min-height: 100%; 
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg); 
    color: var(--text-main); 
    margin: 0; 
    padding: 20px;
    overscroll-behavior-y: none; 
    min-height: 100vh; 
    box-sizing: border-box; 
    position: relative; 
    z-index: 0; 
    background-attachment: fixed;
}

/* --- VLOEIENDE ACHTERGROND ANIMATIE --- */
body::before {
    content: ''; 
    position: fixed; 
    inset: 0; 
    background-color: #064E3B; 
    background-image: radial-gradient(circle at 50% 0%, #047857 0%, #064E3B 100%);
    z-index: -1; 
    opacity: 0; 
    transition: opacity 0.5s ease; 
    pointer-events: none;
}
body.digital-mode::before, body.yatzle-mode::before { 
    opacity: 1; 
}

/* --- THEMA: SPEELTAFEL & YATZLE --- */
body.digital-mode .table-container, body.yatzle-mode .table-container { 
    background-color: #FAFAF9; 
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); 
    border-color: #D6D3D1; 
}
body.digital-mode th:first-child, body.digital-mode td:first-child, body.digital-mode thead th,
body.yatzle-mode th:first-child, body.yatzle-mode td:first-child, body.yatzle-mode thead th { 
    background-color: #FAFAF9; 
}

.dice-area { 
    display: none; 
    width: 400px; 
    position: sticky; 
    top: 20px; 
    z-index: 100; 
    max-width: 100%; 
    flex-direction: column; 
}
body.digital-mode .dice-area, body.yatzle-mode .dice-area { 
    display: flex; 
}

/* --- LAYOUT STRUCTURE --- */
.page-container { 
    max-width: 1100px; 
    margin: 0 auto; 
}

/* --- HEADER STRUCTUUR --- */
.header-section { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    margin-bottom: 24px; 
    position: relative; 
    z-index: 5; 
    gap: 12px; 
}

h1 { 
    margin: 0; 
    font-size: 1.7rem; 
    font-weight: 900; 
    color: #0F172A; 
    display: flex; 
    align-items: center; 
    transition: color 0.3s; 
    min-width: 0; 
    flex: 1 1 auto; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    text-transform: uppercase;
    letter-spacing: -0.5px;
    order: 1;
}
body.digital-mode h1, body.yatzle-mode h1 { 
    color: #FFFFFF; 
    text-shadow: none; 
}
body.yatzle-mode h1 .center-dot { 
    fill: #A7F3D0 !important; 
}

.header-actions { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    margin-left: auto; 
    flex-shrink: 0; 
    flex-wrap: wrap; 
    justify-content: flex-end;
    order: 2;
}
.controls { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 8px; 
    align-items: center; 
    justify-content: flex-end;
}

.app-layout { 
    display: flex; 
    gap: 24px; 
    align-items: flex-start; 
}
.scorecard-area { 
    flex: 1; 
    min-width: 0; 
    position: relative; 
    z-index: 10; 
}

/* --- STRAKKE KNOPPEN & STREAK --- */
button { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    gap: 6px; 
    background-color: #FFFFFF; 
    color: #334155; 
    border: 1px solid #CBD5E1; 
    padding: 10px 16px; 
    border-radius: 8px; 
    font-size: 0.95rem; 
    font-weight: 600; 
    cursor: pointer; 
    transition: all 0.15s ease; 
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); 
    font-family: inherit; 
}
button:hover:not(:disabled) { 
    background-color: #F8FAFC; 
    border-color: #94A3B8; 
}
button:active:not(:disabled) { 
    transform: translateY(1px); 
    box-shadow: none; 
}
button:disabled { 
    opacity: 0.5; 
    cursor: not-allowed; 
    background-color: #F1F5F9; 
    color: #94A3B8; 
    border-color: #E2E8F0; 
}

button.primary { 
    background-color: #0F172A; 
    color: #FFFFFF; 
    border: 1px solid #0F172A; 
}
button.primary:hover:not(:disabled) { 
    background-color: #1E293B; 
    border-color: #1E293B; 
}

button.challenge-btn { 
    background: linear-gradient(135deg, #6aaa64, #538d4e); 
    color: #FFFFFF; 
    border: 1px solid #457241; 
    box-shadow: 0 4px 12px rgba(106, 170, 100, 0.4); 
}
button.challenge-btn:hover:not(:disabled) { 
    background: linear-gradient(135deg, #538d4e, #457241); 
}

button.subtle-btn { 
    background-color: transparent; 
    border: 1px solid transparent; 
    color: var(--text-muted); 
    box-shadow: none; 
    padding: 10px 12px; 
}
button.subtle-btn:hover:not(:disabled) { 
    background-color: #F1F5F9; 
    color: var(--text-main); 
    border-color: #E2E8F0; 
}
button.subtle-btn.reset-btn:hover:not(:disabled) { 
    color: var(--danger); 
    background-color: #FEF2F2; 
    border-color: #FECACA; 
}

/* --- REVIEW PANEL TOGGLE (DESKTOP) --- */
.mobile-toggle-btn { 
    display: none !important; 
}
.review-log-wrap {
    display: block !important; 
}

body.digital-mode button.subtle-btn, body.yatzle-mode button.subtle-btn { 
    color: #E2E8F0; 
}
body.digital-mode button.subtle-btn:hover:not(:disabled), body.yatzle-mode button.subtle-btn:hover:not(:disabled) { 
    color: var(--text-main); 
}

button.icon-btn { 
    padding: 6px 10px; 
    font-size: 1.2rem; 
    border-radius: 8px; 
    border: none; 
    background: transparent; 
    color: var(--text-muted); 
    box-shadow: none; 
}
button.icon-btn:hover:not(:disabled) { 
    background: rgba(0,0,0,0.05); 
    color: var(--text-main); 
}
body.digital-mode button.icon-btn:hover:not(:disabled), body.yatzle-mode button.icon-btn:hover:not(:disabled) { 
    background: rgba(0,0,0,0.1); 
}

.icon-btn-small { 
    width: 26px; 
    height: 26px; 
    padding: 0; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 1.1rem; 
    font-weight: 500; 
    line-height: 1; 
    border-radius: 6px; 
    background: #FFFFFF; 
    border: 1px solid var(--border); 
    color: var(--text-muted); 
    cursor: pointer; 
    transition: all 0.2s; 
    box-shadow: 0 1px 2px rgba(0,0,0,0.05); 
}
.icon-btn-small:hover:not(:disabled) { 
    background: #F1F5F9; 
    color: var(--text-main); 
    border-color: #CBD5E1; 
}
.icon-btn-small:disabled { 
    opacity: 0.3; 
    cursor: not-allowed; 
    box-shadow: none; 
}

.streak-badge { 
    display: flex; 
    align-items: center; 
    gap: 6px; 
    font-weight: 800; 
    font-size: 0.95rem; 
    color: #EA580C; 
    background: #FEF3C7; 
    padding: 6px 12px; 
    border-radius: 8px; 
    border: 1px solid #FCD34D; 
    pointer-events: none; 
}

/* --- SCOREKAART & SCROLL MECHANIEK --- */
.table-wrapper { 
    position: relative; 
    width: 100%; 
    display: flex; 
    align-items: center; 
}

.table-container { 
    width: 100%; 
    background: var(--surface); 
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05); 
    border-radius: 16px; 
    border: 1px solid var(--border); 
    transition: background-color 0.5s, box-shadow 0.5s; 
    overflow-y: visible; 
    overflow-x: auto; 
    scroll-behavior: smooth;
    cursor: grab; 
    -ms-overflow-style: none; 
    scrollbar-width: none;
}
.table-container::-webkit-scrollbar { 
    display: none; 
}
.table-container.active-drag { 
    cursor: grabbing; 
    user-select: none; 
    -webkit-user-select: none; 
}
.table-container input, .table-container button, .table-container .info-icon { 
    cursor: auto; 
}

.scroll-arrow-btn {
    position: absolute; 
    z-index: 20; 
    top: 50%; 
    transform: translateY(-50%);
    width: 40px; 
    height: 40px; 
    border-radius: 50%;
    background: #FFFFFF; 
    border: 1px solid #E2E8F0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    display: flex; 
    align-items: center; 
    justify-content: center;
    cursor: pointer; 
    opacity: 0; 
    pointer-events: none; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #334155; 
    font-size: 1.2rem;
}
.scroll-arrow-btn.visible { 
    opacity: 1; 
    pointer-events: auto; 
}
.scroll-arrow-btn:hover { 
    background: #F8FAFC; 
    color: var(--accent); 
    transform: translateY(-50%) scale(1.1); 
    box-shadow: 0 6px 20px rgba(0,0,0,0.2); 
}
.scroll-arrow-btn.right { 
    right: 12px; 
}

body.digital-mode .scroll-arrow-btn, body.yatzle-mode .scroll-arrow-btn { 
    background: #0F172A; 
    border-color: #334155; 
    color: #FFFFFF; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.4); 
}
body.digital-mode .scroll-arrow-btn:hover, body.yatzle-mode .scroll-arrow-btn:hover { 
    background: #1E293B; 
    color: #10B981; 
}

@media (max-width: 900px) { 
    .scroll-arrow-btn { display: none !important; } 
}

table { 
    border-collapse: collapse; 
    width: 100%; 
    text-align: center; 
    table-layout: auto; 
}
th, td { 
    border-bottom: 1px solid var(--border); 
    border-right: 1px solid var(--border); 
    padding: 0; 
    min-width: 45px; 
    height: 44px; 
    position: relative; 
}
th:last-child, td:last-child { 
    border-right: none; 
} 
tbody tr:last-child td { 
    border-bottom: none; 
}
body.digital-mode.active-turn tbody tr.score-row td:not(:first-child):hover,
body.yatzle-mode.active-turn tbody tr.score-row td:not(:first-child):hover { 
    background-color: rgba(106, 170, 100, 0.15); 
}

th:first-child, td:first-child { 
    position: sticky; 
    left: 0; 
    background-color: var(--surface); 
    z-index: 2; 
    text-align: left; 
    padding: 0 16px; 
    font-weight: 500; 
    white-space: nowrap; 
    width: 1%;
    box-shadow: inset -1px 0 0 var(--border); 
    transition: background-color 0.5s; 
}
thead th { 
    position: sticky; 
    top: 0; 
    background-color: var(--surface); 
    z-index: 3; 
    box-shadow: inset 0 -1px 0 var(--border); 
    transition: background-color 0.5s; 
}
thead th:first-child { 
    z-index: 4; 
    color: var(--text-muted); 
    font-size: 0.85rem; 
    text-transform: uppercase; 
}

.player-name { 
    font-weight: 600; 
    font-size: 1.05rem; 
    padding: 12px 4px; 
    color: #0F172A; 
    transition: padding 0.2s; 
    border: none; 
    background: transparent; 
    width: 100%; 
    min-width: 0; 
    text-align: center; 
    outline: none; 
    box-sizing: border-box; 
} 
.player-name::placeholder { 
    color: var(--text-muted); 
    font-weight: 400; 
}

.cell-flex { 
    display: flex; 
    width: 100%; 
    height: 100%; 
}
.cell-flex input { 
    height: 100%; 
    border: none; 
    text-align: center; 
    background: transparent; 
    font-family: inherit; 
    font-size: 1.2rem; 
    font-weight: 600; 
    color: var(--text-main); 
    outline: none; 
    padding: 0; 
    box-sizing: border-box; 
    transition: background-color 0.3s; 
}
.cell-flex input.score-val { 
    flex: 1; 
    min-width: 0; 
    width: 100%; 
}
.cell-flex input.power-val { 
    display: none; 
    flex: 0 0 34px; 
    width: 34px; 
    min-width: 34px; 
    background: rgba(239, 68, 68, 0.08); 
    color: #DC2626; 
    border-left: 1px solid var(--border); 
    font-size: 1rem; 
    font-weight: 800; 
    line-height: 1; 
    text-align: center; 
    padding: 0; 
}
body.power-die-active .cell-flex input.power-val { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}
.cell-flex input.preview-active::placeholder { 
    color: var(--preview-color); 
    opacity: 0.8; 
    font-style: italic; 
    font-weight: 500; 
}

body.digital-mode .cell-flex input.score-val,
body.yatzle-mode .cell-flex input.score-val { 
    cursor: pointer; 
    caret-color: transparent; 
}

input[type="number"]::-webkit-outer-spin-button, input[type="number"]::-webkit-inner-spin-button { 
    -webkit-appearance: none; 
    margin: 0; 
} 
input[type="number"] { 
    -moz-appearance: textfield; 
}

.calc-row td { 
    background-color: rgba(0,0,0,0.03); 
    color: #0F172A; 
    font-weight: 600; 
    font-size: 1.05rem; 
} 
.calc-row td:first-child { 
    background-color: rgba(0,0,0,0.03); 
}
.calc-val { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    width: 100%; 
    height: 100%; 
}
.section-divider td { 
    border-top: 2px solid var(--border); 
} 
.hint { 
    font-size: 0.75rem; 
    color: var(--text-muted); 
    font-weight: 400; 
    display: block; 
    margin-top: 1px; 
    text-transform: none; 
}
.grand-total td { 
    background-color: #0F172A !important; 
    color: white !important; 
    font-size: 1.2rem; 
    font-weight: 700; 
} 
.grand-total td:first-child { 
    background-color: #0F172A !important; 
    color: white !important; 
}

/* --- GLOBAL TOOLTIP --- */
.info-icon { 
    cursor: help; 
    color: var(--text-muted); 
    transition: color 0.2s; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    margin-left: 6px; 
    margin-top: 2px; 
}
.info-icon:hover { 
    color: var(--accent); 
}

.global-tooltip {
    position: fixed; 
    z-index: 10000; 
    pointer-events: none;
    width: 280px; 
    padding: 14px; 
    border-radius: 10px;
    background: #1E293B; 
    color: #F8FAFC; 
    font-size: 0.85rem; 
    line-height: 1.5; 
    font-weight: 500;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.3);
    opacity: 0; 
    transform: translateY(-5px); 
    transition: opacity 0.2s, transform 0.2s;
    display: none;
}
.global-tooltip.show { 
    opacity: 1; 
    transform: translateY(0); 
}
body.digital-mode .global-tooltip, body.yatzle-mode .global-tooltip { 
    background: #FFFFFF; 
    color: #0F172A; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.6); 
}

/* --- UITLEG & REGELS --- */
.house-rule-alert, .yatzle-rules {
    padding: 16px; 
    background: #F1F5F9; 
    border-radius: 12px; 
    border: 1px solid #E2E8F0;
    font-size: 0.9rem; 
    color: #334155; 
    text-align: left; 
    display: none; 
    line-height: 1.5; 
    font-weight: 500;
}
body.digital-mode .house-rule-alert, body.yatzle-mode .house-rule-alert,
body.digital-mode .yatzle-rules, body.yatzle-mode .yatzle-rules {
    background: rgba(0, 0, 0, 0.25); 
    border-color: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.9); 
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
}
body.digital-mode .house-rule-alert strong, body.yatzle-mode .house-rule-alert strong,
body.digital-mode .yatzle-rules strong, body.yatzle-mode .yatzle-rules strong { 
    color: #FFFFFF; 
}
.yatzle-rules em { 
    color: #A7F3D0; 
    font-style: normal; 
}

/* --- YATZLE RULES ACCORDION (MOBIEL) --- */
.yatzle-rules-accordion {
    display: none;
    background: rgba(0, 0, 0, 0.25); 
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    color: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
}

.yatzle-rules-accordion summary {
    padding: 14px 16px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    outline: none;
}

/* Verbergt het standaard browser-pijltje */
.yatzle-rules-accordion summary::-webkit-details-marker {
    display: none; 
}

/* Ons eigen mooie pijltje toevoegen */
.yatzle-rules-accordion summary::after {
    content: '▼';
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.yatzle-rules-accordion[open] summary::after {
    transform: rotate(180deg);
}

.yatzle-rules-text {
    padding: 0 16px 16px 16px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.yatzle-rules-text strong { color: #FFFFFF; }
.yatzle-rules-text em { color: #A7F3D0; font-style: normal; }

/* Standaard desktop weergave */
body.has-house-rule .house-rule-alert.desktop-only { 
    display: block; 
    margin-top: 16px; 
}
body.has-house-rule .house-rule-alert.mobile-only { 
    display: none; 
}

body.yatzle-mode .yatzle-rules.desktop-only { 
    display: block; 
    margin-top: 16px; 
}
body.yatzle-mode .yatzle-rules.mobile-only { 
    display: none; 
}

/* --- DOBBELSTENEN PANEEL HOOFDSCHERM --- */
.dice-panel { 
    background: #FFFFFF; 
    border-radius: 16px; 
    padding: 24px; 
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2); 
    text-align: center; 
}
.dice-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: flex-start; 
    margin-bottom: 24px; 
}
.dice-header-text { 
    text-align: left; 
}
.dice-header h2 { 
    margin: 0; 
    font-size: 1.3rem; 
    font-weight: 800; 
    color: #0F172A; 
}
.dice-header p { 
    margin: 4px 0 0; 
    font-size: 0.95rem; 
    font-weight: 500; 
    color: var(--text-muted); 
}

.dice-container { 
    display: flex; 
    gap: 8px; 
    justify-content: center; 
    align-items: center; 
    margin: 0 0 28px 0; 
    min-height: 70px; 
    width: 100%; 
    flex-wrap: wrap; 
}

/* --- REVIEW PANEL & COMPACT MINI DICE --- */
.yatzle-review-panel { 
    display: none; 
    background: #FAFAF9; 
    border: 1px solid var(--border); 
    border-radius: 12px; 
    padding: 18px; 
    text-align: left; 
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02); 
    margin-top: 16px; 
}
.review-score { 
    font-size: 1.25rem; 
    font-weight: 800; 
    color: #0F172A; 
    margin-bottom: 12px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-top: 16px; 
}
.prob-tag { 
    font-size: 0.75rem; 
    background: #FEF3C7; 
    color: #B45309; 
    border: 1px solid #FCD34D; 
    padding: 4px 8px; 
    border-radius: 6px; 
    font-weight: 700; 
    display: inline-flex; 
    align-items: center; 
    gap: 4px;
}
.review-log { 
    display: flex; 
    flex-direction: column; 
    gap: 8px; 
    max-height: 280px; 
    overflow-y: auto; 
    padding-right: 6px; 
    font-size: 0.85rem; 
}
.review-log::-webkit-scrollbar { 
    width: 6px; 
}
.review-log::-webkit-scrollbar-thumb { 
    background: #CBD5E1; 
    border-radius: 6px; 
}
.review-log-item { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    border-bottom: 1px solid #E2E8F0; 
    padding-bottom: 6px; 
    color: var(--text-main); 
    font-size: 0.8rem; 
}
.review-log-item:last-child { 
    border-bottom: none; 
}
.review-log-item span:first-child { 
    display: flex; 
    align-items: center; 
    gap: 6px; 
}
.review-log-item span:last-child { 
    text-align: right; 
    line-height: 1.2; 
}
.review-log-item strong { 
    display: block; 
    font-size: 0.85rem; 
}
.review-turn-badge { 
    font-family: 'Inter', sans-serif; 
    font-size: 0.65rem; 
    background: #E2E8F0; 
    color: #475569; 
    padding: 2px 5px; 
    border-radius: 4px; 
    font-weight: 800; 
    letter-spacing: 0;
}

.review-dice-wrap { 
    display: flex; 
    gap: 3px; 
    flex-shrink: 0; 
}
.review-die {
    width: 24px; 
    height: 24px; 
    border-radius: 4px; 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    grid-template-rows: repeat(3, 1fr); 
    gap: 1px; 
    padding: 2px; 
    box-sizing: border-box;
    box-shadow: inset 0 2px 2px rgba(255,255,255,0.2), inset 0 -2px 0 rgba(0,0,0,0.1), 0 2px 3px rgba(0,0,0,0.1);
}
.review-die.bg-first { background: #6aaa64; border: 1px solid #538d4e; }
.review-die.bg-second { background: #eab308; border: 1px solid #ca8a04; }
.review-die.bg-third { background: #94a3b8; border: 1px solid #64748b; }
.review-die .dot { width: 5px; height: 5px; background: #ffffff; border-radius: 50%; box-shadow: inset 0 1px 1px rgba(0,0,0,0.3); margin: auto; }

.second-chance-panel { 
    display: flex; 
    gap: 8px; 
    justify-content: center; 
    align-items: center; 
    flex-wrap: wrap; 
    margin-top: 12px; 
    display: none; 
}
.player-chance-btn { 
    background: #FEF3C7; 
    color: #B45309; 
    border: 1px solid #FDE68A; 
    font-size: 0.8rem; 
    padding: 6px 10px; 
}
.player-chance-btn:hover:not(:disabled) { 
    background: #FDE68A; 
    border-color: #FCD34D; 
}
.player-chance-btn:disabled { 
    background: #F1F5F9; 
    color: #CBD5E1; 
    border-color: #E2E8F0; 
    text-decoration: line-through; 
}

/* --- PREMIUM DOBBELSTENEN BASIS & WORDLE SKIN --- */
.die {
    flex: 1 1 0; 
    min-width: 0; 
    max-width: 60px; 
    aspect-ratio: 1 / 1; 
    height: auto;
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%); 
    border: 1px solid #cbd5e1; 
    border-radius: 14px;
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    grid-template-rows: repeat(3, 1fr); 
    gap: 2px; 
    place-items: center;
    padding: 6px; 
    cursor: pointer; 
    box-sizing: border-box !important; 
    position: relative; 
    overflow: hidden;
    box-shadow: inset 0 2px 2px rgba(255,255,255,1), inset 0 -4px 0 rgba(0,0,0,0.15), 0 5px 8px rgba(0,0,0,0.1);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.dice-container .die.idle { cursor: default; opacity: 0.8; }
.dice-container .die.kept {
    border-color: var(--accent) !important; 
    transform: translateY(6px); 
    background: radial-gradient(circle at 30% 30%, #eff6ff 0%, #dbeafe 100%) !important;
    box-shadow: inset 0 2px 2px rgba(255,255,255,0.8), inset 0 -2px 0 rgba(0,0,0,0.2), 0 2px 3px rgba(0,0,0,0.1), 0 0 0 3px rgba(79, 70, 229, 0.5) !important;
}

.dot { 
    background: #0f172a; 
    border-radius: 50%; 
    width: 12px; 
    height: 12px; 
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.6), 0 1px 0 rgba(255,255,255,0.8); 
}

/* WORDLE THEMA VOOR DOBBELSTENEN */
body.yatzle-mode .die { 
    background: #3a3a3c; 
    border-color: #565758; 
    color: #fff; 
    box-shadow: inset 0 2px 2px rgba(255,255,255,0.1), inset 0 -4px 0 rgba(0,0,0,0.4), 0 5px 8px rgba(0,0,0,0.2); 
}
body.yatzle-mode .die .dot { 
    background: #ffffff; 
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.3); 
}

body.yatzle-mode .die.kept-first { background: #6aaa64 !important; border-color: #538d4e !important; box-shadow: inset 0 2px 2px rgba(255,255,255,0.3), inset 0 -4px 0 #457241, 0 2px 3px rgba(0,0,0,0.2), 0 0 0 3px rgba(106, 170, 100, 0.4) !important; }
body.yatzle-mode .die.kept-second { background: #eab308 !important; border-color: #ca8a04 !important; box-shadow: inset 0 2px 2px rgba(255,255,255,0.3), inset 0 -4px 0 #a16207, 0 2px 3px rgba(0,0,0,0.2), 0 0 0 3px rgba(234, 179, 8, 0.4) !important; }
body.yatzle-mode .die.kept-third { background: #94a3b8 !important; border-color: #64748b !important; box-shadow: inset 0 2px 2px rgba(255,255,255,0.3), inset 0 -4px 0 #475569, 0 2px 3px rgba(0,0,0,0.2), 0 0 0 3px rgba(148, 163, 184, 0.4) !important; }

/* --- HUISREGELS & OVERIGE SKINS --- */
.theme-second-chance .die { background: #FFFFFF; border-color: #FBBF24; box-shadow: 0 0 15px rgba(251, 191, 36, 0.6), inset 0 2px 2px #FFF, inset 0 -4px 0 #FDE68A; }
.theme-lucky-six .die { background: linear-gradient(135deg, #10B981, #047857); border-color: #F59E0B; box-shadow: inset 0 2px 2px rgba(255,255,255,0.3), inset 0 -4px 0 #064E3B, 0 5px 10px rgba(16, 185, 129, 0.4); }
.theme-lucky-six .dot { background: #FBBF24; box-shadow: inset 0 1px 2px rgba(0,0,0,0.4); }
.dice-container.theme-power-die { gap: 6px; }
.dice-container.theme-power-die .die:not(:last-child) .dot { width: 12px; height: 12px; }

/* --- POWER DIE SPECIFIEKE STYLING --- */
.dice-container.theme-power-die .die:last-child {
    background: linear-gradient(135deg, #fca5a5 0%, #ef4444 50%, #b91c1c 100%) !important;
    border-color: #991b1b !important;
    color: #ffffff !important;
    font-size: 1.2rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 2px rgba(255,255,255,0.4), inset 0 -4px 0 #7f1d1d, 0 5px 8px rgba(0,0,0,0.3) !important;
}

.dice-container.theme-power-die .die:last-child.kept {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 50%, #7f1d1d 100%) !important;
    border-color: #450a0a !important;
    box-shadow: inset 0 2px 2px rgba(255,255,255,0.2), inset 0 -2px 0 #450a0a, 0 2px 3px rgba(0,0,0,0.1), 0 0 0 3px rgba(239, 68, 68, 0.6) !important;
    transform: translateY(6px);
}

body.power-die-active .dice-container .die:last-child .dot {
    display: none;
}

/* Overige skins */
.theme-black .die { background: linear-gradient(135deg, #333, #111); border-color: #000; box-shadow: inset 0 2px 2px rgba(255,255,255,0.2), inset 0 -4px 0 rgba(0,0,0,0.6), 0 5px 8px rgba(0,0,0,0.3); } .theme-black .dot { background: #fff; box-shadow: inset 0 1px 3px rgba(0,0,0,0.8); }
.theme-wooden .die { background: linear-gradient(135deg, #DEB887, #D2B48C); border-color: #8B5A2B; box-shadow: inset 0 2px 2px rgba(255,255,255,0.4), inset 0 -4px 0 rgba(0,0,0,0.3), 0 5px 8px rgba(0,0,0,0.2); } .theme-wooden .dot { background: #3E2723; box-shadow: inset 0 1px 2px rgba(0,0,0,0.8), 0 1px 0 rgba(255,255,255,0.4); }
.theme-marble .die { background: #f8fafc; border-color: #cbd5e1; background-image: radial-gradient(circle at 10% 20%, transparent 20%, rgba(0,0,0,0.05) 21%, rgba(0,0,0,0.05) 26%, transparent 27%), radial-gradient(circle at 80% 80%, transparent 20%, rgba(0,0,0,0.05) 21%, rgba(0,0,0,0.05) 26%, transparent 27%); box-shadow: inset 0 2px 2px white, inset 0 -4px 0 rgba(0,0,0,0.1), 0 5px 8px rgba(0,0,0,0.1); } .theme-marble .dot { background: #475569; box-shadow: inset 0 1px 2px rgba(0,0,0,0.6); }
.theme-regenwormen .die { background: linear-gradient(135deg, #F5DEB3, #E6C280); border-color: #D2B48C; box-shadow: inset 0 2px 2px rgba(255,255,255,0.4), inset 0 -4px 0 rgba(0,0,0,0.2), 0 5px 8px rgba(0,0,0,0.1); } .theme-regenwormen .dot { background: #2563EB; box-shadow: inset 0 1px 2px rgba(0,0,0,0.5), 0 1px 0 rgba(255,255,255,0.6); }    
.theme-qwixx .die:nth-child(1) { background: #EF4444; border-color: #B91C1C; } .theme-qwixx .die:nth-child(2) { background: #EAB308; border-color: #A16207; } .theme-qwixx .die:nth-child(3) { background: #22C55E; border-color: #15803D; } .theme-qwixx .die:nth-child(4) { background: #3B82F6; border-color: #1D4ED8; } .theme-qwixx .die:nth-child(5), .theme-qwixx .die:nth-child(6) { background: #ffffff; border-color: #cbd5e1; } .theme-qwixx .die:nth-child(1) .dot, .theme-qwixx .die:nth-child(2) .dot, .theme-qwixx .die:nth-child(3) .dot, .theme-qwixx .die:nth-child(4) .dot { background: #fff; } .theme-qwixx .die:nth-child(5) .dot, .theme-qwixx .die:nth-child(6) .dot { background: #0f172a; }
.theme-minecraft .die { border-radius: 0 !important; border: 2px solid #000; padding: 4px; } .theme-minecraft .dot { border-radius: 0 !important; background: #000; width: 10px; height: 10px; } .theme-minecraft .die:nth-child(1) { background: linear-gradient(to bottom, #4ade80 40%, #8b5a2b 40%); } .theme-minecraft .die:nth-child(2) { background: #9ca3af; } .theme-minecraft .die:nth-child(3) { background: #78350f; } .theme-minecraft .die:nth-child(4) { background: #1e1b4b; } .theme-minecraft .die:nth-child(4) .dot { background: #a855f7; } .theme-minecraft .die:nth-child(5) { background: #67e8f9; border-color: #0891b2; } .theme-minecraft .die:nth-child(6) { background: #ef4444; border-color: #991b1b; } 
.theme-watermelon .die { border-radius: 50% !important; padding: 8px !important; background: radial-gradient(circle at 50% 50%, #ef4444 55%, #fff 65%, #22c55e 75%); border: 3px solid #166534; } .theme-watermelon .dot { background: #000; border-radius: 50%; width: 8px; height: 12px; }
.theme-minions .die { border-radius: 50% !important; padding: 8px !important; background: linear-gradient(to bottom, #facc15 50%, #2563eb 50%); border: 4px solid #475569; } .theme-minions .dot { background: #000; width: 8px; height: 8px; box-shadow: 0 0 0 3px #fff, 0 0 0 5px #94a3b8; }
.theme-toxic .die { background: #000; border-color: #84cc16; box-shadow: inset 0 0 15px #84cc16, 0 5px 15px rgba(132, 204, 22, 0.3); } .theme-toxic .dot { background: #a3e635; box-shadow: 0 0 8px #bef264, 0 0 12px #bef264; }
.theme-casino .die { background: radial-gradient(circle at 30% 30%, #ef4444, #991b1b); border-color: #7f1d1d; } .theme-casino .dot { background: #fff; }
.theme-blueprint .die { background: #1e3a8a; border-color: #60a5fa; } .theme-blueprint .dot { background: #fff; }
.theme-synthwave .die { background: linear-gradient(135deg, #2e1065, #db2777); border-color: #fbcfe8; } .theme-synthwave .dot { background: #2dd4bf; }
.theme-rainbow .die { background: linear-gradient(45deg, #ef4444, #f97316, #eab308, #22c55e, #3b82f6, #a855f7); border-color: #fff; } .theme-rainbow .dot { background: #fff; }
.theme-getal .die, .theme-matrix .die { display: flex !important; align-items: center; justify-content: center; padding: 0 !important; } .theme-getal .die { background: #fff; border-color: #cbd5e1; } .theme-getal .die::after { content: attr(data-val); font-size: 2.5rem; font-weight: 900; color: #1e293b; } .theme-matrix .die { background: #000; border-color: #22c55e; } .theme-matrix .die::after { content: attr(data-val); font-size: 2.2rem; font-family: monospace; font-weight: 800; color: #4ade80; }
.theme-galaxy .die { background: radial-gradient(circle at 50% 50%, #31105c, #0f051d); border-color: #8b5cf6; } .theme-galaxy .dot { background: #38bdf8; }
.theme-gold .die { background: linear-gradient(135deg, #fef08a 0%, #ca8a04 50%, #fef08a 100%); border-color: #a16207; } .theme-gold .dot { background: #422006; }
.theme-ice .die { background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%); border-color: #7dd3fc; } .theme-ice .dot { background: #0369a1; }
.theme-chocolate .die { background: linear-gradient(135deg, #582f0e 0%, #3a1d07 100%); border-color: #2b1404; } .theme-chocolate .dot { background: #faedcd; }
.theme-red .die { background: #ef4444; border-color: #b91c1c; } .theme-red .dot { background: #fff; }
.theme-blue .die { background: #3b82f6; border-color: #1d4ed8; } .theme-blue .dot { background: #fff; }
.theme-green .die { background: #22c55e; border-color: #15803D; } .theme-green .dot { background: #fff; }
.theme-yellow .die { background: #facc15; border-color: #ca8a04; } .theme-yellow .dot { background: #000; }
.theme-purple .die { background: #a855f7; border-color: #7e22ce; } .theme-purple .dot { background: #fff; }
.theme-dot-red .die { background: #fff; border-color: #cbd5e1; } .theme-dot-red .dot { background: #ef4444; }
.theme-dot-blue .die { background: #fff; border-color: #cbd5e1; } .theme-dot-blue .dot { background: #3b82f6; }

/* --- Phineas en Ferb --- */
.theme-phineas .die { box-shadow: inset 0 2px 2px rgba(255,255,255,0.4), inset 0 -4px 0 rgba(0,0,0,0.2); } 
.theme-phineas .die:nth-child(1) { background: repeating-linear-gradient(to bottom, #f97316 0, #f97316 12px, #fff 12px, #fff 24px); border-bottom: 6px solid #1d4ed8; } 
.theme-phineas .die:nth-child(1) .dot { background: #000; box-shadow: 0 0 0 2px #fff; } 
.theme-phineas .die:nth-child(2) { background: linear-gradient(to bottom, #fef08a 35%, #7e22ce 35%); border-top: 5px solid #22c55e; } 
.theme-phineas .die:nth-child(2) .dot { background: #fff; box-shadow: 0 0 2px #000; } 
.theme-phineas .die:nth-child(3) { background: linear-gradient(to bottom, #ef4444 65%, #fff 65%); border-color: #dc2626; } 
.theme-phineas .die:nth-child(3) .dot { background: #f97316; box-shadow: 0 0 0 1.5px #fff, 0 1px 2px #000; } 
.theme-phineas .die:nth-child(4) { background: #14b8a6; border-color: #0f766e; border-bottom: 6px solid #ea580c; } 
.theme-phineas .die:nth-child(4) .dot { background: #000; } 
.theme-phineas .die:nth-child(4)[data-val="6"] { border-top: 10px solid #78350f; border-bottom: none; } 
.theme-phineas .die:nth-child(5) { background: linear-gradient(to right, #fff 30%, #000 30%, #000 70%, #fff 70%); border-color: #94a3b8; } 
.theme-phineas .die:nth-child(5) .dot { background: #000; box-shadow: 0 0 0 1.5px #fff; } 
.theme-phineas .die:nth-child(6) { background: #fbcfe8; border-color: #be185d; } 
.theme-phineas .die:nth-child(6) .dot { background: #fff; } 

/* --- Toy Story --- */
.theme-toystory .die { box-shadow: inset 0 2px 2px rgba(255,255,255,0.4), inset 0 -4px 0 rgba(0,0,0,0.2); } 
.theme-toystory .die:nth-child(1) { background: #facc15; background-image: repeating-linear-gradient(0deg, transparent, transparent 8px, rgba(239,68,68,0.4) 8px, rgba(239,68,68,0.4) 10px), repeating-linear-gradient(90deg, transparent, transparent 8px, rgba(239,68,68,0.4) 8px, rgba(239,68,68,0.4) 10px); border-bottom: 6px solid #1d4ed8; } 
.theme-toystory .die:nth-child(1) .dot { background: #fff; box-shadow: 0 0 0 2px #000; } 
.theme-toystory .die:nth-child(2) { background: #fff; border: 3px solid #22c55e; border-bottom: 6px solid #a855f7; } 
.theme-toystory .die:nth-child(2) .dot { background: #dc2626; box-shadow: 0 0 0 1px #000; } 
.theme-toystory .die:nth-child(3) { background: repeating-linear-gradient(45deg, rgba(0,0,0,0.05) 0, rgba(0,0,0,0.05) 2px, transparent 2px, transparent 6px), linear-gradient(to bottom, #4ade80 75%, #bbf7d0 75%); border-color: #166534; } 
.theme-toystory .die:nth-child(3) .dot { background: #166534; box-shadow: 0 1px 1px #fff; } 
.theme-toystory .die:nth-child(4) { background: #fbcfe8; border-color: #db2777; border-radius: 50% 50% 12px 12px !important; } 
.theme-toystory .die:nth-child(4) .dot { background: #be185d; } 
.theme-toystory .die:nth-child(5) { background: linear-gradient(to bottom, #84cc16 50%, #a855f7 50%, #a855f7 58%, #1d4ed8 58%); } 
.theme-toystory .die:nth-child(5) .dot { background: #000; box-shadow: 0 0 0 2px #fff; } 
.theme-toystory .die:nth-child(6) { background: #8b5a2b; border-color: #4a3014; border-top: 6px solid #94a3b8; } 
.theme-toystory .die:nth-child(6) .dot { background: #fff; } 

/* --- Spider-Man --- */
.theme-spiderman .die { background: #dc2626; border-color: #1d4ed8; background-image: repeating-linear-gradient(45deg, transparent, transparent 6px, rgba(0,0,0,0.5) 6px, rgba(0,0,0,0.5) 8px), repeating-linear-gradient(-45deg, transparent, transparent 6px, rgba(0,0,0,0.5) 6px, rgba(0,0,0,0.5) 8px); box-shadow: inset 0 -6px 0 #1e3a8a, 0 5px 8px rgba(0,0,0,0.2); } 
.theme-spiderman .dot { background: #fff; box-shadow: 0 0 0 2px #000; }

@keyframes roll-anim { 
    0% { transform: rotate(0deg) scale(1); } 
    50% { transform: rotate(180deg) scale(0.7); } 
    100% { transform: rotate(360deg) scale(1); } 
}
.die.rolling { 
    animation: roll-anim 0.4s ease-in-out; 
}

.dice-controls { 
    display: flex; 
    flex-direction: column; 
    gap: 10px; 
}
.dice-controls button { 
    width: 100%; 
    padding: 14px; 
    font-size: 1.1rem; 
}
.share-btn { 
    background: linear-gradient(135deg, #f59e0b, #d97706); 
    border-color: #b45309; 
    color: #fff; 
}
.share-btn:hover:not(:disabled) { 
    background: linear-gradient(135deg, #d97706, #b45309); 
    border-color: #92400e; 
}

.lang-select { 
    appearance: none; 
    border: 1px solid #CBD5E1; 
    border-radius: 8px; 
    background: #fff; 
    color: #334155; 
    padding: 8px 24px 8px 8px; 
    font: inherit; 
    font-weight: 700; 
    min-width: 52px; 
    width: 52px; 
    font-size: 0.76rem; 
    text-align: center; 
}
.lang-select-wrap { 
    position: relative; 
    flex-shrink: 0;
    order: 3; 
}
.lang-select-wrap::after { 
    content: '▾'; 
    position: absolute; 
    right: 8px; 
    top: 50%; 
    transform: translateY(-50%); 
    color: #64748B; 
    pointer-events: none; 
    font-size: 0.7rem; 
}

.copy-toast {
    position: fixed; 
    right: 20px; 
    bottom: 20px; 
    background: rgba(15, 23, 42, 0.96); 
    color: #fff;
    border-radius: 10px; 
    padding: 10px 14px; 
    font-size: 0.85rem; 
    font-weight: 600; 
    opacity: 0; 
    transform: translateY(10px);
    pointer-events: none; 
    transition: opacity 0.2s ease, transform 0.2s ease; 
    z-index: 2000; 
    box-shadow: 0 12px 25px rgba(0,0,0,0.2);
}
.copy-toast.show { 
    opacity: 1; 
    transform: translateY(0); 
}

/* --- MODALS --- */
.modal-overlay { 
    position: fixed; 
    inset: 0; 
    background: rgba(0,0,0,0.6); 
    backdrop-filter: blur(5px); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    z-index: 1000; 
    opacity: 0; 
    pointer-events: none; 
    transition: opacity 0.3s; 
}
.modal-overlay.open { 
    opacity: 1; 
    pointer-events: auto; 
}
.modal-content { 
    background: var(--bg); 
    width: 95%; 
    max-width: 900px; 
    border-radius: 20px; 
    padding: 24px; 
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); 
    transform: translateY(20px) scale(0.95); 
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); 
    position: relative; 
    max-height: 85vh; 
    display: flex; 
    flex-direction: column; 
    overflow: hidden; 
}

/* --- SCHONE MODAL SPACING --- */
.modal-content { 
    background: var(--bg); 
    width: 95%; 
    max-width: 800px; /* Iets compacter en leesbaarder op desktop */
    border-radius: 20px; 
    padding: 28px; 
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); 
    transform: translateY(20px) scale(0.95); 
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); 
    position: relative; 
    max-height: 85vh; 
    display: flex; 
    flex-direction: column; 
    overflow: hidden; 
}

.modal-text-body {
    text-align: left; 
    line-height: 1.6; 
    font-size: 0.95rem;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.help-list {
    padding-left: 20px;
    margin: 2px 0 6px 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.modal-text-body h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0F172A;
    margin: 10px 0 2px 0;
}
.modal-overlay.open .modal-content { 
    transform: translateY(0) scale(1); 
}
.modal-close { 
    position: absolute; 
    top: 20px; 
    right: 20px; 
    background: #E2E8F0; 
    border: none; 
    width: 36px; 
    height: 36px; 
    border-radius: 50%; 
    font-size: 1.2rem; 
    color: var(--text-main); 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    transition: all 0.2s; 
    z-index: 20; 
}
.modal-close:hover { 
    background: #cbd5e1; 
    transform: rotate(90deg); 
}
.modal-title { 
    margin: 0 0 16px; 
    font-size: 1.5rem; 
    font-weight: 800; 
    color: #0F172A; 
    text-transform: uppercase; 
    letter-spacing: -0.5px; 
    display: flex; 
    align-items: center; 
    flex-shrink: 0; 
}

.skin-modal-body { 
    flex: 1; 
    overflow-y: auto; 
    padding: 4px; 
    margin-bottom: 12px; 
    display: flex; 
    flex-direction: column; 
    gap: 24px; 
    -webkit-overflow-scrolling: touch; 
}
.skin-section-header { 
    display: flex; 
    flex-direction: column; 
    gap: 4px; 
    margin-bottom: 10px; 
    border-bottom: 1px solid var(--border); 
    padding-bottom: 6px; 
}
.skin-section-title { 
    font-size: 0.8rem; 
    font-weight: 800; 
    text-transform: uppercase; 
    color: var(--text-muted); 
    letter-spacing: 0.8px; 
}

/* Grid geoptimaliseerd voor mobiel en desktop */
.skin-grid { 
    display: grid; 
    grid-template-columns: 
    repeat(3, 1fr); gap: 16px; 
}

.skin-card { 
    background: var(--surface); 
    border: 2px solid #E2E8F0; 
    border-radius: 14px; 
    padding: 14px; 
    text-align: center; 
    cursor: pointer; 
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); 
    position: relative; 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
    align-items: center; 
    min-height: 135px; 
    height: auto; 
    box-sizing: border-box; 
}
.skin-card:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 8px 16px -4px rgba(0,0,0,0.06); 
    border-color: #cbd5e1; 
}
.skin-card.is-rule { 
    border-color: #CBD5E1; 
    background: #F8FAFC; 
}
.skin-card.is-rule::after { 
    content: 'Variant'; 
    position: absolute; 
    top: 10px; 
    left: 12px; 
    background: #E2E8F0; 
    color: #475569; 
    font-size: 0.6rem; 
    font-weight: 700; 
    padding: 2px 6px; 
    border-radius: 4px; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
}
.skin-card.selected { 
    border-color: var(--accent); 
    background: #EEF2FF; 
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15); 
}
.skin-card.selected::before { 
    content: '✓'; 
    position: absolute; 
    top: 10px; 
    right: 10px; 
    background: var(--accent); 
    color: white; 
    font-size: 0.75rem; 
    font-weight: 800; 
    width: 22px; 
    height: 22px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    z-index: 10; 
}

.skin-info-wrap { 
    width: 100%; 
    display: flex; 
    flex-direction: column; 
    gap: 4px; 
    margin-top: 6px; 
}
.skin-name { 
    font-weight: 700; 
    font-size: 0.9rem; 
    color: #1E293B; 
}
.skin-desc { 
    font-size: 0.75rem; 
    color: #64748B; 
    line-height: 1.3; 
}

.preview-dice { 
    display: flex; 
    justify-content: center; 
    gap: 4px; 
    width: 100%; 
    flex-wrap: wrap; 
}
.preview-dice .die { 
    width: 32px; 
    height: 32px; 
    max-width: none; 
    border-radius: 6px; 
    padding: 2px; 
    pointer-events: none; 
    border-bottom-width: 2px; 
    box-shadow: none; 
    flex: none; 
}
.preview-dice .dot { 
    width: 5px; 
    height: 5px; 
    box-shadow: none; 
}

/* --- SCORE HISTORIE UI --- */
.history-modal-content { 
    display: flex; 
    flex-direction: column; 
    max-height: 85vh; 
    padding: 24px; 
}
.history-header { 
    display: flex; 
    align-items: center; 
    justify-content: flex-start; 
    gap: 16px; 
    margin-bottom: 20px; 
}
.history-tabs { 
    display: flex; 
    gap: 8px; 
    border-bottom: 1px solid var(--border); 
    padding-bottom: 12px; 
    margin-bottom: 16px; 
    overflow-x: auto; 
    -ms-overflow-style: none; 
    scrollbar-width: none; 
}
.history-tabs::-webkit-scrollbar { 
    display: none; 
}
.history-tab { 
    background: transparent; 
    border: 1px solid transparent; 
    color: var(--text-muted); 
    font-weight: 700; 
    font-size: 0.95rem; 
    padding: 8px 16px; 
    cursor: pointer; 
    border-radius: 8px; 
    transition: all 0.2s; 
    white-space: nowrap; 
    flex-shrink: 0; 
}
.history-tab:hover:not(.active) { 
    background: #F8FAFC; 
    border-color: #E2E8F0; 
    color: var(--text-main); 
}
.history-tab.active { 
    background: #0F172A; 
    color: #FFFFFF; 
    box-shadow: none; 
}
.history-controls { 
    display: flex; 
    justify-content: flex-end; 
    margin-bottom: 16px; 
}
.history-sort-select { 
    padding: 8px 32px 8px 12px; 
    font-weight: 600; 
    font-size: 0.85rem; 
    border: 1px solid var(--border); 
    border-radius: 8px; 
    background-color: var(--surface); 
    color: var(--text-main); 
    cursor: pointer; 
    outline: none; 
    appearance: none; 
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748B' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E"); 
    background-repeat: no-repeat; 
    background-position: right 10px center; 
}
.history-list { 
    display: flex; 
    flex-direction: column; 
    overflow-y: auto; 
    flex: 1; 
    padding: 0 8px; 
}
.history-item-container { 
    background: #F8FAFC; 
    border: 1px solid #E2E8F0; 
    border-radius: 12px; 
    margin-bottom: 10px; 
    transition: all 0.2s; 
}
.history-item { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 14px 18px; 
    cursor: pointer; 
}
.history-item:hover { 
    background: #F1F5F9; 
    border-radius: 12px; 
}
.history-details { 
    display: none; 
    border-top: 1px solid #E2E8F0; 
    padding: 14px 18px; 
    background: #FFFFFF; 
    font-size: 0.85rem; 
    border-radius: 0 0 12px 12px; 
}
.history-item-container.expanded .history-details { 
    display: block; 
}
.log-entry { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 6px 0; 
    border-bottom: 1px solid #F1F5F9; 
    font-size: 0.8rem; 
}
.log-entry:last-child { 
    border-bottom: none; 
}

.history-item-left { 
    display: flex; 
    flex-direction: column; 
    gap: 4px; 
    min-width: 0; 
}
.history-item-name { 
    font-weight: 800; 
    color: #0F172A; 
    font-size: 1rem; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
}
.history-item-date { 
    font-size: 0.75rem; 
    color: var(--text-muted); 
    font-weight: 500; 
}
.history-item-score { 
    font-size: 1.4rem; 
    font-weight: 900; 
    color: var(--accent); 
    flex-shrink: 0; 
    margin-left: 10px;
}
.history-empty { 
    text-align: center; 
    color: var(--text-muted); 
    font-size: 0.95rem; 
    padding: 40px 20px; 
    font-weight: 500; 
}
.theme-badge { 
    font-size: 0.65rem; 
    background: #E2E8F0; 
    color: #475569; 
    padding: 2px 6px; 
    border-radius: 4px; 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
    flex-shrink: 0;
}

/* --- SEO FOOTER --- */
.seo-footer {
    margin-top: 60px;
    text-align: center;
    font-size: 0.65rem;
    color: var(--text-muted);
    line-height: 1.5;
    opacity: 0.35; 
    transition: opacity 0.3s ease;
    padding-bottom: 20px;
    user-select: none; 
}
.seo-footer:hover {
    opacity: 1; 
}
.seo-footer p {
    margin: 0 auto 6px auto;
    max-width: 600px;
}
body.digital-mode .seo-footer, body.yatzle-mode .seo-footer {
    color: rgba(255, 255, 255, 0.4);
}

/* --- RESPONSIVE MOBILE STYLES (< 900px) --- */
@media (max-width: 900px) {
    .header-section { 
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap; 
        gap: 10px;
        margin-bottom: 16px;
    }
    
    .header-section > h1 {
        flex: 1;
        order: 1;
    }
    
    .lang-select-wrap {
        order: 2;
        flex-shrink: 0;
    }
    
    .header-actions { 
        order: 3;
        width: 100%; 
    }
    
    .controls { 
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        width: 100%;
    }
    
    .controls button {
        width: 100%;
        justify-content: center;
        font-size: 0.9rem;
        padding: 10px 8px;
    }

    .lang-select { min-width: 48px; width: 48px; }

    /* --- REVIEW PANEL TOGGLE (MOBIEL) --- */
    .mobile-toggle-btn { 
        display: inline-flex !important; 
    }
    
    #yatzleReviewPanel.collapsed .review-log-wrap {
        display: none !important;
    }
    
    #yatzleReviewPanel.collapsed .review-score {
        margin-bottom: 0;
    }
    
    body.is-review-mode .dice-controls { 
        display: none !important; 
    }

    /* --- SVG Oog Wissel Logica --- */
    #yatzleReviewPanel.collapsed .icon-eye-hide { 
        display: none; 
    }
    #yatzleReviewPanel.collapsed .icon-eye-show { 
        display: block; 
    }

    #yatzleReviewPanel:not(.collapsed) .icon-eye-hide { 
        display: block; 
    }
    #yatzleReviewPanel:not(.collapsed) .icon-eye-show { 
        display: none; 
    }

    .modal-content { 
        padding: 20px 16px; 
        width: 100%; 
        height: 100%; 
        max-height: 100vh; 
        border-radius: 0; 
    }
    .modal-text-body {
        font-size: 0.9rem;
        gap: 10px;
    }

    body.has-house-rule .house-rule-alert.desktop-only { display: none !important; }
    body.has-house-rule .house-rule-alert.mobile-only { display: block !important; margin-bottom: 16px; }

    body.yatzle-mode .yatzle-rules.desktop-only { display: none !important; }
    body.yatzle-mode .yatzle-rules.mobile-only { display: block !important; margin-bottom: 16px; }

    body.yatzle-mode .yatzle-rules-accordion.mobile-only { 
        display: block !important; 
        margin-bottom: 16px; 
    }

    body.digital-mode, body.yatzle-mode { padding-bottom: 200px; } 
    .app-layout { flex-direction: column; gap: 15px; }
    .scorecard-area { width: 100%; }
    body.digital-mode .dice-area, body.yatzle-mode .dice-area { position: fixed; top: auto; bottom: 0; left: 0; right: 0; width: 100%; z-index: 100; }
    .dice-panel { border-radius: 24px 24px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,0.3); border: none; padding: 20px; background: rgba(255, 255, 255, 0.98); }
    .dice-header-text h2 { display: none; }
    .dice-header { margin-bottom: 10px; align-items: center; }
    .dice-header-text p { font-size: 1rem; color: var(--text-main); margin: 0; font-weight: 800; }
    .dice-container { margin: 10px 0 20px 0; min-height: 60px; }
    .dice-controls { flex-direction: row; }
    .dice-controls button { font-size: 0.95rem; padding: 12px; }
    
    .modal-content { padding: 16px; width: 100%; height: 100%; max-height: 100vh; border-radius: 0; }
    .skin-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .skin-card { min-height: 115px; height: auto; padding: 8px; }
    .skin-name { font-size: 0.8rem; }
    .skin-desc { font-size: 0.65rem; }
    .skin-card .preview-dice .die { display: none !important; }
    .skin-card .preview-dice .die:nth-child(1),
    .skin-card .preview-dice .die:nth-child(3),
    .skin-card .preview-dice .die:nth-child(6) { display: grid !important; }
    .skin-card .preview-dice.theme-getal .die:nth-child(1),
    .skin-card .preview-dice.theme-getal .die:nth-child(3),
    .skin-card .preview-dice.theme-getal .die:nth-child(6),
    .skin-card .preview-dice.theme-matrix .die:nth-child(1),
    .skin-card .preview-dice.theme-matrix .die:nth-child(3),
    .skin-card .preview-dice.theme-matrix .die:nth-child(6) { display: flex !important; }
}