/*!********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[2].use[1]!./node_modules/next/dist/build/webpack/loaders/next-font-loader/index.js??ruleSet[1].rules[14].oneOf[2].use[2]!./node_modules/next/font/google/target.css?{"path":"app/layout.tsx","import":"Cormorant_Garamond","arguments":[{"subsets":["latin"],"variable":"--font-display","weight":["500","600","700"]}],"variableName":"displayFont"} ***!
  \********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/* cyrillic-ext */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/_next/static/media/393d45a2251e223a-s.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/_next/static/media/8715d2ed531152f4-s.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/_next/static/media/c48b38fe8bb532f3-s.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/_next/static/media/48410f3df60da620-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/_next/static/media/7b89a4fd5e90ede0-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/_next/static/media/393d45a2251e223a-s.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/_next/static/media/8715d2ed531152f4-s.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/_next/static/media/c48b38fe8bb532f3-s.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/_next/static/media/48410f3df60da620-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/_next/static/media/7b89a4fd5e90ede0-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/_next/static/media/393d45a2251e223a-s.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/_next/static/media/8715d2ed531152f4-s.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/_next/static/media/c48b38fe8bb532f3-s.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/_next/static/media/48410f3df60da620-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/_next/static/media/7b89a4fd5e90ede0-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}@font-face {font-family: 'Cormorant Garamond Fallback';src: local("Times New Roman");ascent-override: 95.27%;descent-override: 29.59%;line-gap-override: 0.00%;size-adjust: 96.98%
}.__className_30721a {font-family: 'Cormorant Garamond', 'Cormorant Garamond Fallback';font-style: normal
}.__variable_30721a {--font-display: 'Cormorant Garamond', 'Cormorant Garamond Fallback'
}

/*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[2].use[1]!./node_modules/next/dist/build/webpack/loaders/next-font-loader/index.js??ruleSet[1].rules[14].oneOf[2].use[2]!./node_modules/next/font/google/target.css?{"path":"app/layout.tsx","import":"Space_Grotesk","arguments":[{"subsets":["latin"],"variable":"--font-body","weight":["400","500","700"]}],"variableName":"bodyFont"} ***!
  \*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/* vietnamese */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/e1aab0933260df4d-s.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/b7387a63dd068245-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/36966cca54120369-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* vietnamese */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/_next/static/media/e1aab0933260df4d-s.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/_next/static/media/b7387a63dd068245-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/_next/static/media/36966cca54120369-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* vietnamese */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/_next/static/media/e1aab0933260df4d-s.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/_next/static/media/b7387a63dd068245-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/_next/static/media/36966cca54120369-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}@font-face {font-family: 'Space Grotesk Fallback';src: local("Arial");ascent-override: 89.71%;descent-override: 26.62%;line-gap-override: 0.00%;size-adjust: 109.69%
}.__className_48cfcd {font-family: 'Space Grotesk', 'Space Grotesk Fallback';font-style: normal
}.__variable_48cfcd {--font-body: 'Space Grotesk', 'Space Grotesk Fallback'
}

/*!*************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    min-height: 100vh;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

button,
input {
    font: inherit;
}

.container {
    width: 100%;
    max-width: 1200px;
}

.players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    grid-gap: 16px;
    gap: 16px;
    margin-bottom: 24px;
    position: relative;
}

.player-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s, box-shadow 0.2s;
}

.player-card:active {
    transform: scale(0.98);
}

.player-label {
    font-size: 12px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.life-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
}

.life-total {
    font-size: 72px;
    font-weight: 700;
    color: #1a1a2e;
    text-align: center;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
    min-width: 120px;
}

.btn {
    flex: 1 1;
    padding: 12px 16px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-large {
    padding: 16px 20px;
    font-size: 40px;
    border-radius: 16px;
    flex-shrink: 0;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.btn-primary:active {
    transform: scale(0.95);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
}

.btn-secondary:active {
    transform: scale(0.95);
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
}

.commander-damage {
    font-size: 14px;
    font-weight: 600;
    color: #f5576c;
    text-align: center;
    margin-bottom: 16px;
}

.button-group {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.btn-commander {
    background: linear-gradient(135deg, #ffa500 0%, #ff8c00 100%);
    color: #fff;
}

.btn-commander:active {
    transform: scale(0.95);
    box-shadow: 0 4px 12px rgba(255, 165, 0, 0.4);
}

.btn-commander-minus {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: #fff;
}

.btn-commander-minus:active {
    transform: scale(0.95);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.slider-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.slider-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.custom-slider {
    flex: 1 1;
    -webkit-appearance: none;
    -moz-appearance: none;
         appearance: none;
    height: 6px;
    border-radius: 4px;
    background: linear-gradient(to right, #667eea, #764ba2);
    outline: none;
    cursor: pointer;
}

.custom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #667eea;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    cursor: pointer;
}

.custom-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #667eea;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    cursor: pointer;
}

.slider-value {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a2e;
    min-width: 28px;
    text-align: center;
}

.btn-apply {
    padding: 8px 14px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-apply:active {
    transform: scale(0.95);
}

.btn-toggle {
    padding: 8px 10px;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    min-width: 36px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-toggle.adding {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.btn-toggle.subtracting {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
}

.btn-toggle:active {
    transform: scale(0.95);
}

.btn-reset-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 3px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    font-size: 32px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    -webkit-backdrop-filter: blur(10px);
            backdrop-filter: blur(10px);
    z-index: 15;
}

.btn-reset-center:active {
    transform: translate(-50%, -50%) scale(0.9);
    background: rgba(255, 255, 255, 0.25);
}

.btn-random-center {
    position: absolute;
    top: calc(50% + 56px);
    left: 50%;
    transform: translateX(-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 3px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    font-size: 26px;
    font-weight: 900;
    font-family: Georgia, serif;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    -webkit-backdrop-filter: blur(10px);
            backdrop-filter: blur(10px);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-random-center:active {
    transform: translateX(-50%) scale(0.9);
    background: rgba(255, 255, 255, 0.25);
}

.btn-dice-center {
    position: absolute;
    top: calc(50% - 112px);
    left: 50%;
    transform: translateX(-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 3px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    -webkit-backdrop-filter: blur(10px);
            backdrop-filter: blur(10px);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-dice-center:active {
    transform: translateX(-50%) scale(0.9);
    background: rgba(255, 255, 255, 0.25);
}

.player-card.highlighted {
    outline: 4px solid #ffd700;
    box-shadow: 0 0 24px rgba(255, 215, 0, 0.6);
    background: rgba(255, 253, 220, 0.98);
}

#dice-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    flex-direction: column;
    gap: 20px;
}

#dice-modal.active {
    display: flex;
}

.dice-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.d20-svg {
    filter: drop-shadow(0 0 20px rgba(102, 126, 234, 0.8));
    animation: none;
}

.d20-svg.rolling {
    animation: diceroll 1.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes diceroll {
    0%   { transform: rotate(0deg) scale(0.6); opacity: 0.4; }
    15%  { transform: rotate(72deg) scale(1.1); opacity: 1; }
    30%  { transform: rotate(144deg) scale(0.9); opacity: 0.8; }
    45%  { transform: rotate(216deg) scale(1.15); opacity: 1; }
    60%  { transform: rotate(288deg) scale(0.95); opacity: 0.9; }
    75%  { transform: rotate(340deg) scale(1.05); opacity: 1; }
    88%  { transform: rotate(355deg) scale(1.02); opacity: 1; }
    100% { transform: rotate(360deg) scale(1); opacity: 1; }
}

.dice-number {
    font-size: 52px;
    font-weight: 900;
    color: #fff;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 20px rgba(102, 126, 234, 0.9);
    opacity: 0;
    transition: opacity 0.4s ease 1.4s;
    min-height: 64px;
}

.dice-number.visible {
    opacity: 1;
}

.dice-result-label {
    font-size: 18px;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.7);
    opacity: 0;
    transition: opacity 0.4s ease 1.5s;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.dice-result-label.visible {
    opacity: 1;
}

.dice-type-label {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 4px;
}

.coin-wrap {
    perspective: 600px;
    width: 140px;
    height: 140px;
    display: none;
}

.coin-wrap.active {
    display: block;
}

.coin {
    width: 140px;
    height: 140px;
    position: relative;
    transform-style: preserve-3d;
}

.coin.flipping {
    animation: coinflip 1.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes coinflip {
    0%   { transform: rotateY(0deg) scale(0.7); }
    20%  { transform: rotateY(360deg) scale(1.1); }
    40%  { transform: rotateY(720deg) scale(0.95); }
    60%  { transform: rotateY(1080deg) scale(1.05); }
    80%  { transform: rotateY(1440deg) scale(0.98); }
    100% { transform: rotateY(1800deg) scale(1); }
}

.coin-face {
    position: absolute;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    -webkit-backface-visibility: hidden;
            backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: 900;
    box-shadow: 0 0 24px rgba(102,126,234,0.6);
}

.coin-heads {
    background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
    color: #7a5500;
}

.coin-tails {
    background: linear-gradient(135deg, #c0c0c0 0%, #888 100%);
    color: #333;
    transform: rotateY(180deg);
}

.dice-picker {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 8px;
}

.dice-picker-title {
    font-size: 16px;
    font-weight: 700;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.dice-picker-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 10px;
    gap: 10px;
}

.btn-dice-pick {
    width: 70px;
    height: 70px;
    border-radius: 14px;
    border: 2px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.18s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    -webkit-backdrop-filter: blur(6px);
            backdrop-filter: blur(6px);
    letter-spacing: 0.5px;
}

.btn-dice-pick:hover,
.btn-dice-pick:active {
    background: rgba(102,126,234,0.5);
    border-color: #667eea;
    transform: scale(1.08);
    box-shadow: 0 0 14px rgba(102,126,234,0.5);
}

.btn-dice-pick .dice-icon {
    font-size: 22px;
    line-height: 1;
}

.btn-dice-close {
    margin-top: 4px;
    padding: 8px 24px;
    border-radius: 10px;
    border: 2px solid rgba(255,255,255,0.2);
    background: transparent;
    color: rgba(255,255,255,0.5);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-dice-close:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.dice-screen {
    display: none;
}

.dice-screen.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

#confirmation-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.confirmation-box {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 320px;
}

.confirmation-box h2 {
    font-size: 24px;
    color: #1a1a2e;
    margin-bottom: 12px;
    font-weight: 700;
}

.confirmation-box p {
    font-size: 14px;
    color: rgba(0, 0, 0, 0.6);
    margin-bottom: 24px;
}

.confirmation-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-confirm {
    flex: 1 1;
    padding: 12px 20px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-confirm:active {
    transform: scale(0.95);
}

.btn-cancel {
    flex: 1 1;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.1);
    color: #1a1a2e;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel:active {
    transform: scale(0.95);
}

@media (max-width: 768px) {
    .players-grid {
        grid-template-columns: 1fr 1fr;
    }

    .life-total {
        font-size: 56px;
    }
}

@media (max-width: 1024px) {
    body {
        padding: 8px;
    }

    .container {
        width: 100%;
        max-width: 100%;
    }

    .players-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr 1fr;
        grid-gap: 8px;
        gap: 8px;
        margin-bottom: 12px;
        height: calc(100vh - 80px);
    }

    .player-card {
        padding: 12px;
        border-radius: 16px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .players-grid > .player-card:nth-child(1) {
        transform: rotate(180deg);
    }

    .players-grid > .player-card:nth-child(2) {
        transform: rotate(180deg);
    }

    .players-grid > .player-card:nth-child(3) {
        transform: rotate(0deg);
    }

    .players-grid > .player-card:nth-child(4) {
        transform: rotate(0deg);
    }

    .player-label {
        font-size: 10px;
        margin-bottom: 6px;
    }

    .life-display {
        gap: 12px;
        margin-bottom: 8px;
    }

    .life-total {
        font-size: 48px;
        min-width: 100px;
    }

    .btn-large {
        padding: 12px 16px;
        font-size: 20px;
    }

    .btn-reset-center {
        width: 70px;
        height: 70px;
        font-size: 28px;
    }

    .commander-damage {
        font-size: 12px;
        margin-bottom: 10px;
    }

    .button-group {
        gap: 4px;
        margin-bottom: 8px;
        width: 100%;
    }

    .btn {
        padding: 8px 10px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 4px;
    }

    .players-grid {
        height: calc(100vh - 80px);
        gap: 6px;
    }

    .player-card {
        padding: 10px;
    }

    .life-display {
        gap: 10px;
    }

    .life-total {
        font-size: 40px;
        min-width: 90px;
    }

    .btn-large {
        padding: 10px 14px;
        font-size: 18px;
    }

    .btn-reset-center {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }

    .commander-damage {
        font-size: 11px;
        margin-bottom: 8px;
    }

    .button-group {
        margin-bottom: 6px;
    }

    .btn {
        padding: 6px 8px;
        font-size: 11px;
    }
}

@media (orientation: landscape) and (max-height: 600px) {
    .players-grid {
        height: calc(100vh - 60px);
        gap: 6px;
    }

    .player-card {
        padding: 8px;
    }

    .life-display {
        gap: 8px;
        margin-bottom: 6px;
    }

    .life-total {
        font-size: 36px;
        min-width: 80px;
    }

    .btn-large {
        padding: 8px 12px;
        font-size: 16px;
    }

    .btn-reset-center {
        width: 60px;
        height: 60px;
        font-size: 22px;
    }

    .commander-damage {
        font-size: 10px;
        margin-bottom: 6px;
    }

    .button-group {
        margin-bottom: 4px;
        gap: 2px;
    }

    .btn {
        padding: 4px 6px;
        font-size: 10px;
    }
}

