/* ================================================================
   TOOLS.CSS - Shared styles for Tool pages
   (Dice Roller, Coin Flip, Team Generator)
   Plugin: Vong Quay May Man
   ================================================================ */


/* ===== TOOL HERO ===== */
.vqmm-tool-hero {
    background: linear-gradient(160deg, #0a0e27 0%, #131842 35%, #1a237e 70%, #0d1137 100%);
    position: relative;
    overflow: hidden;
    padding: 48px 0 56px;
}
.vqmm-tool-hero::before {
    content: '';
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(223,48,0,0.10) 0%, rgba(254,96,0,0.05) 40%, transparent 70%);
    pointer-events: none;
}
.vqmm-tool-hero-top {
    text-align: center;
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
}
.vqmm-tool-hero-title {
    font-size: 1.8em;
    font-weight: 800;
    color: #fff;
    margin: 0 0 6px;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.vqmm-tool-hero-subtitle {
    font-size: 0.95em;
    color: rgba(255,255,255,0.55);
    margin: 0;
    font-weight: 400;
}


/* ===== TOOL HERO LAYOUT (main + sidebar grid) ===== */
.vqmm-tool-hero-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 28px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}
.vqmm-tool-hero-layout--wide {
    grid-template-columns: 1fr;
    max-width: 960px;
}
.vqmm-tool-main {
    min-width: 0;
}

/* ===== TOOL AREA (interactive container) ===== */
.vqmm-tool-area {
    padding: 32px;
    background: rgba(255,255,255,0.97);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.25);
    position: relative;
    z-index: 1;
    text-align: center;
}
.vqmm-tool-area--wide {
    max-width: none;
}

/* ===== TOOL RESULT TEXT ===== */
.vqmm-tool-result {
    font-size: 1.2em;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 20px;
    min-height: 1.5em;
}

/* ===== TOOL STATS ROW ===== */
.vqmm-tool-stats {
    display: flex;
    justify-content: center;
    gap: 28px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}
.vqmm-tool-stat {
    text-align: center;
}
.vqmm-tool-stat-label {
    display: block;
    font-size: 0.78em;
    color: #999;
    margin-bottom: 2px;
}
.vqmm-tool-stat-value {
    display: block;
    font-size: 1.1em;
    font-weight: 700;
    color: #333;
}

/* ===== TOOL SMALL BUTTON ===== */
.vqmm-tool-btn-small {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.78em;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}
.vqmm-tool-btn-small:hover {
    background: #e5e7eb;
    color: #333;
}

/* ===== TOOL SIDEBAR ===== */
.vqmm-tool-sidebar {
    position: sticky;
    top: 80px;
}
.vqmm-tool-sidebar-panel {
    background: rgba(255,255,255,0.97);
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.25);
}
.vqmm-tool-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.vqmm-tool-sidebar-header h3 {
    font-size: 0.95em;
    font-weight: 700;
    color: #222;
    margin: 0;
}

/* ===== TOOL HISTORY ===== */
.vqmm-tool-history {
    max-height: 400px;
    overflow-y: auto;
}
.vqmm-tool-history::-webkit-scrollbar { width: 5px; }
.vqmm-tool-history::-webkit-scrollbar-track { background: transparent; }
.vqmm-tool-history::-webkit-scrollbar-thumb { background: #d0d0d0; border-radius: 4px; }
.vqmm-tool-history-empty {
    text-align: center;
    color: #999;
    font-size: 0.85em;
    padding: 20px 0;
}
.vqmm-tool-history li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.85em;
    color: #555;
    list-style: none;
}
.vqmm-tool-history li:last-child { border-bottom: none; }

/* ===== COIN CONTAINER ===== */
.vqmm-coin-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    padding: 24px 0 32px;
    perspective: 800px;
}
.vqmm-coin-wrapper {
    perspective: 800px;
}
.vqmm-coin {
    width: 150px;
    height: 150px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.3s;
    cursor: default;
}
.vqmm-coin-front,
.vqmm-coin-back {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border-radius: 50%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.vqmm-coin-front {
    background: linear-gradient(145deg, #f5c842, #daa520);
    color: #5a3800;
    box-shadow: 0 4px 20px rgba(218,165,32,0.4), inset 0 2px 4px rgba(255,255,255,0.4);
    border: 3px solid #c8961e;
}
.vqmm-coin-back {
    background: linear-gradient(145deg, #c0c0c0, #888);
    color: #333;
    box-shadow: 0 4px 20px rgba(160,160,160,0.4), inset 0 2px 4px rgba(255,255,255,0.3);
    border: 3px solid #8a8a8a;
    transform: rotateY(180deg);
}
.vqmm-coin-icon {
    font-size: 1.8em;
    line-height: 1;
}
.vqmm-coin-text {
    font-size: 0.85em;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Coin flip animation */
.vqmm-coin.flipping {
    animation: vqmm-coin-flip 1.5s ease-in-out;
}
@keyframes vqmm-coin-flip {
    0%   { transform: rotateY(0deg) translateY(0); }
    20%  { transform: rotateY(540deg) translateY(-80px); }
    50%  { transform: rotateY(1080deg) translateY(-40px); }
    75%  { transform: rotateY(1620deg) translateY(-15px); }
    100% { transform: rotateY(2160deg) translateY(0); }
}
/* Final states */
.vqmm-coin.heads { transform: rotateY(0deg); }
.vqmm-coin.tails { transform: rotateY(180deg); }

/* Custom labels */
.vqmm-coin-labels {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}
.vqmm-coin-label-group {
    display: flex;
    align-items: center;
    gap: 6px;
}
.vqmm-coin-label-group label {
    font-size: 0.82em;
    font-weight: 600;
    color: #666;
    white-space: nowrap;
}
.vqmm-coin-label-input {
    width: 100px;
    padding: 5px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.85em;
    font-family: inherit;
    color: #333;
    transition: border-color 0.2s;
}
.vqmm-coin-label-input:focus {
    outline: none;
    border-color: #df3000;
}

/* Coin stats */
.vqmm-coin-stats {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}
.vqmm-coin-stat-bar {
    display: flex;
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
    background: #f3f4f6;
    margin: 12px 0;
}
.vqmm-coin-bar-heads {
    background: linear-gradient(90deg, #f5c842, #daa520);
    transition: width 0.4s;
}
.vqmm-coin-bar-tails {
    background: linear-gradient(90deg, #a0a0a0, #888);
    transition: width 0.4s;
}

/* Coin history items */
.vqmm-coin-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.85em;
}
.vqmm-coin-history-item:last-child { border-bottom: none; }
.vqmm-coin-history-result { color: #333; font-weight: 600; }
.vqmm-coin-history-time { color: #999; font-size: 0.88em; }
.vqmm-coin-history-empty { text-align: center; color: #999; font-size: 0.85em; padding: 20px 0; }

/* ===== TEAM GENERATOR LAYOUT ===== */
.vqmm-team-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    text-align: left;
}
.vqmm-team-input-section {}
.vqmm-team-results-section {}

.vqmm-team-input-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.vqmm-team-input-header label {
    font-size: 0.9em;
    font-weight: 700;
    color: #333;
}
.vqmm-team-name-count {
    font-size: 0.78em;
    font-weight: 500;
    color: #999;
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 6px;
}
.vqmm-team-input-actions {
    display: flex;
    gap: 6px;
}
.vqmm-team-textarea {
    width: 100%;
    min-height: 160px;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 0.92em;
    font-family: inherit;
    line-height: 1.6;
    color: #333;
    resize: vertical;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.vqmm-team-textarea:focus {
    outline: none;
    border-color: #df3000;
    box-shadow: 0 0 0 3px rgba(223,48,0,0.08);
}
.vqmm-team-textarea::placeholder { color: #aaa; }

.vqmm-team-config {
    margin: 16px 0;
}
.vqmm-team-config-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.vqmm-team-config-row > label {
    font-size: 0.88em;
    font-weight: 600;
    color: #444;
    min-width: 60px;
}
.vqmm-team-counter {
    display: inline-flex;
    align-items: center;
    gap: 0;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}
.vqmm-team-counter-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: #f3f4f6;
    font-size: 1.1em;
    font-weight: 700;
    color: #444;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
}
.vqmm-team-counter-btn:hover { background: #e5e7eb; }
.vqmm-team-counter-value {
    width: 44px;
    text-align: center;
    font-size: 1em;
    font-weight: 700;
    color: #1a1a2e;
    border-left: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
    line-height: 36px;
}
.vqmm-team-mode-options {
    display: flex;
    gap: 14px;
}
.vqmm-team-mode-label {
    font-size: 0.85em;
    color: #555;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}
.vqmm-team-mode-label input[type="radio"] { accent-color: #df3000; }

/* Team results */
.vqmm-team-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.vqmm-team-results-header h3 {
    font-size: 0.95em;
    font-weight: 700;
    color: #222;
    margin: 0;
}
.vqmm-team-results-actions {
    display: flex;
    gap: 6px;
}
.vqmm-team-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
    min-height: 100px;
}
.vqmm-team-results-empty {
    text-align: center;
    color: #999;
    font-size: 0.88em;
    padding: 40px 0;
    grid-column: 1 / -1;
}
.vqmm-team-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid #eee;
}
.vqmm-team-card__header {
    padding: 10px 14px;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
}
.vqmm-team-card__count {
    font-size: 0.78em;
    opacity: 0.85;
    font-weight: 400;
}
.vqmm-team-card__list {
    list-style: none;
    margin: 0;
    padding: 10px 14px;
}
.vqmm-team-card__list li {
    padding: 5px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.88em;
    color: #444;
}
.vqmm-team-card__list li:last-child { border-bottom: none; }

/* Shuffling animation */
.vqmm-team-results.shuffling {
    opacity: 0.5;
    filter: blur(1px);
    transition: none;
}

/* ===== TOAST NOTIFICATION ===== */
.vqmm-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1a1a2e;
    color: #fff;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 0.88em;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}
.vqmm-toast--visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}


/* ================================================================
   DICE ROLLER
   ================================================================ */

/* Container for 1-3 dice */
.vqmm-dice-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    padding: 16px 0 24px;
}

/* Single die */
.vqmm-dice {
    width: 100px;
    height: 100px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12), inset 0 2px 0 rgba(255,255,255,0.6);
    border: 2px solid #e5e7eb;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    padding: 14px;
    transition: transform 0.2s;
}

/* Dice dot */
.vqmm-dice-dot {
    width: 16px;
    height: 16px;
    background: #1a1a2e;
    border-radius: 50%;
    align-self: center;
    justify-self: center;
}

/* --- Dice dot placement via data-row/data-col attributes --- */
/* Row 0 = top, 1 = middle, 2 = bottom */
/* Col 0 = left, 1 = center, 2 = right */
.vqmm-dice-dot[data-row="0"] { grid-row: 1; }
.vqmm-dice-dot[data-row="1"] { grid-row: 2; }
.vqmm-dice-dot[data-row="2"] { grid-row: 3; }
.vqmm-dice-dot[data-col="0"] { grid-column: 1; }
.vqmm-dice-dot[data-col="1"] { grid-column: 2; }
.vqmm-dice-dot[data-col="2"] { grid-column: 3; }

/* (Dice controls use .vqmm-tool-tab-bar, history uses .vqmm-tool-history) */

/* Rolling animation */
.vqmm-dice.rolling {
    animation: vqmm-dice-shake 0.4s ease infinite;
}
@keyframes vqmm-dice-shake {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    15%      { transform: translate(-3px, 2px) rotate(-5deg); }
    30%      { transform: translate(3px, -2px) rotate(3deg); }
    45%      { transform: translate(-2px, -3px) rotate(5deg); }
    60%      { transform: translate(2px, 3px) rotate(-3deg); }
    75%      { transform: translate(-3px, 1px) rotate(2deg); }
}


/* (Coin styles defined above in shared section) */


/* (Team generator styles defined above in shared section) */


/* ================================================================
   RANDOM PASSWORD GENERATOR
   ================================================================ */

/* Password display */
.vqmm-rp-display {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8f9fa;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 12px;
    word-break: break-all;
}
.vqmm-rp-password {
    flex: 1;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 1.15em;
    font-weight: 700;
    color: #1a1a2e;
    letter-spacing: 0.5px;
    user-select: all;
}
.vqmm-rp-password.vqmm-rp-animate {
    animation: vqmm-rp-flash 0.4s ease;
}
@keyframes vqmm-rp-flash {
    0%   { opacity: 0.3; transform: scale(0.97); }
    50%  { opacity: 1; transform: scale(1.02); }
    100% { opacity: 1; transform: scale(1); }
}
.vqmm-rp-copy-btn {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    color: #666;
}
.vqmm-rp-copy-btn:hover {
    background: #e5e7eb;
    color: #333;
}

/* Strength bar */
.vqmm-rp-strength {
    height: 6px;
    background: #f3f4f6;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 20px;
}
.vqmm-rp-strength-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s, background 0.4s;
}

/* Options */
.vqmm-rp-options {
    margin-bottom: 20px;
    text-align: left;
}
.vqmm-rp-option-row {
    margin-bottom: 14px;
}
.vqmm-rp-option-row label {
    display: block;
    font-size: 0.88em;
    font-weight: 600;
    color: #444;
    margin-bottom: 8px;
}
.vqmm-rp-option-row input[type="range"] {
    width: 100%;
    accent-color: #df3000;
    height: 6px;
}
.vqmm-rp-checkboxes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.vqmm-rp-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85em;
    color: #555;
    cursor: pointer;
}
.vqmm-rp-checkbox input[type="checkbox"] {
    accent-color: #df3000;
    width: 16px;
    height: 16px;
}

/* History item */
.vqmm-rp-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.85em;
}
.vqmm-rp-history-item:last-child { border-bottom: none; }
.vqmm-rp-history-pw {
    font-family: 'Courier New', Consolas, monospace;
    font-weight: 600;
    color: #333;
    font-size: 0.9em;
}
.vqmm-rp-history-pw:hover { color: #df3000; }
.vqmm-rp-history-time {
    color: #999;
    font-size: 0.82em;
    white-space: nowrap;
}


/* ================================================================
   RANDOM NUMBER GENERATOR
   ================================================================ */

/* Big number result */
.vqmm-rn-result {
    font-size: 3em;
    font-weight: 800;
    color: #1a1a2e;
    min-height: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
    transition: opacity 0.2s;
}
.vqmm-rn-result.vqmm-rn-animating {
    opacity: 0.5;
}
.vqmm-rn-big-number {
    font-size: 1em;
    line-height: 1;
}

/* Multiple number badges */
.vqmm-rn-multi-results {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
.vqmm-rn-number-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    padding: 8px 14px;
    background: linear-gradient(135deg, #f8f9fa, #eef1f5);
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 0.4em;
    font-weight: 800;
    color: #1a1a2e;
}

/* Range inputs */
.vqmm-rn-range {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 20px;
}
.vqmm-rn-input-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.vqmm-rn-input-group label {
    font-size: 0.82em;
    font-weight: 600;
    color: #666;
}
.vqmm-rn-input-group input[type="number"] {
    width: 120px;
    padding: 10px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 700;
    color: #1a1a2e;
    text-align: center;
    font-family: inherit;
    transition: border-color 0.2s;
}
.vqmm-rn-input-group input[type="number"]:focus {
    outline: none;
    border-color: #df3000;
    box-shadow: 0 0 0 3px rgba(223,48,0,0.08);
}
.vqmm-rn-separator {
    font-size: 1.2em;
    color: #999;
    font-weight: 700;
    margin-top: 18px;
}
.vqmm-rn-multi-options {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}


/* ================================================================
   RANDOM WORD GENERATOR
   ================================================================ */

/* Big word result */
.vqmm-rw-result {
    font-size: 1.6em;
    font-weight: 700;
    color: #1a1a2e;
    min-height: 1.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 0;
}
.vqmm-rw-big-word {
    font-size: 1.4em;
    font-weight: 800;
    background: linear-gradient(135deg, #df3000, #fe6000);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Multiple word badges */
.vqmm-rw-multi-results {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
.vqmm-rw-word-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    background: linear-gradient(135deg, #f8f9fa, #eef1f5);
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1em;
    font-weight: 700;
    color: #1a1a2e;
}


/* ================================================================
   SHARED TOOL COMPONENTS
   ================================================================ */

/* Primary action button (gradient, like spin) */
.vqmm-tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 32px;
    background: linear-gradient(135deg, #df3000, #fe6000);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
    box-shadow: 0 4px 16px rgba(223,48,0,0.3);
    text-decoration: none;
    line-height: 1.4;
}
.vqmm-tool-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(223,48,0,0.4);
    opacity: 0.95;
}
.vqmm-tool-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(223,48,0,0.3);
}
.vqmm-tool-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Secondary button (outline) */
.vqmm-tool-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 24px;
    background: #fff;
    color: #df3000;
    border: 2px solid #df3000;
    border-radius: 10px;
    font-size: 0.9em;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    line-height: 1.4;
}
.vqmm-tool-btn-secondary:hover {
    background: #df3000;
    color: #fff;
}
.vqmm-tool-btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* (Sidebar and history styles defined above) */

/* Tab bar (control selector) */
.vqmm-tool-tab-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #f3f4f6;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 20px;
}

/* Individual tab */
.vqmm-tool-tab {
    flex: 1;
    padding: 8px 16px;
    border: none;
    border-radius: 7px;
    background: transparent;
    font-size: 0.88em;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
    text-align: center;
}
.vqmm-tool-tab:hover {
    color: #333;
    background: rgba(255,255,255,0.5);
}
.vqmm-tool-tab.active {
    background: #fff;
    color: #df3000;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* Result modal (simpler overlay) */
.vqmm-tool-result-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}
.vqmm-tool-result-modal.open {
    opacity: 1;
    visibility: visible;
}
.vqmm-tool-result-modal-inner {
    background: #fff;
    border-radius: 16px;
    padding: 40px 32px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    transform: scale(0.9);
    transition: transform 0.25s;
}
.vqmm-tool-result-modal.open .vqmm-tool-result-modal-inner {
    transform: scale(1);
}
.vqmm-tool-result-modal-icon {
    font-size: 3em;
    margin-bottom: 12px;
    line-height: 1;
}
.vqmm-tool-result-modal-title {
    font-size: 1.6em;
    font-weight: 800;
    color: #1a1a2e;
    margin: 0 0 8px;
}
.vqmm-tool-result-modal-desc {
    font-size: 0.95em;
    color: #666;
    margin: 0 0 24px;
    line-height: 1.5;
}
.vqmm-tool-result-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 28px;
    background: #f3f4f6;
    border: none;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 600;
    color: #444;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
}
.vqmm-tool-result-modal-close:hover {
    background: #e5e7eb;
}


/* ================================================================
   TOOLS GRID SECTION (homepage "Cong cu khac")
   ================================================================ */
.vqmm-tools-section {
    background: #f7f8fb;
    padding: 64px 0;
}
.vqmm-tools-section .vqmm-section-title {
    font-size: 1.8em;
    font-weight: 800;
    color: #1a1a2e;
    text-align: center;
    margin: 0 0 40px;
}

/* Grid */
.vqmm-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Tool card */
.vqmm-tool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
    border-radius: 14px;
    padding: 32px 24px 28px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid #eee;
    transition: transform 0.25s, box-shadow 0.25s;
}
.vqmm-tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 36px rgba(0,0,0,0.12);
}
.vqmm-tool-card-icon {
    font-size: 2.4em;
    margin-bottom: 14px;
    line-height: 1;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #f8f9fa, #eef1f5);
}
.vqmm-tool-card-title {
    font-size: 1.1em;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 6px;
}
.vqmm-tool-card-desc {
    font-size: 0.85em;
    color: #666;
    line-height: 1.55;
    margin: 0 0 16px;
    flex: 1;
}
.vqmm-tool-card-cta {
    font-size: 0.88em;
    font-weight: 600;
    color: #df3000;
    transition: color 0.2s;
}
.vqmm-tool-card:hover .vqmm-tool-card-cta {
    color: #fe6000;
}


/* ================================================================
   SEO CONTENT (reuses existing .vqmm-seo-body pattern)
   ================================================================ */
.vqmm-tool-seo-content {
    background: #fff;
    padding: 64px 0;
}
.vqmm-tool-seo-content .vqmm-seo-body {
    max-width: 760px;
    margin: 0 auto;
    line-height: 1.8;
    color: #444;
    font-size: 1em;
}


/* ================================================================
   RESPONSIVE
   ================================================================ */

/* Tablet & below */
@media (max-width: 768px) {
    /* Tool hero layout -> stack */
    .vqmm-tool-hero-layout {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 16px;
    }
    .vqmm-tool-sidebar {
        position: static;
    }

    /* Team layout -> stack */
    .vqmm-team-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Tool hero */
    .vqmm-tool-hero {
        padding: 32px 0 40px;
    }
    .vqmm-tool-hero-title {
        font-size: 1.4em;
    }
    .vqmm-tool-hero-subtitle {
        font-size: 0.85em;
    }

    /* Tool area */
    .vqmm-tool-area {
        padding: 24px 20px;
    }

    /* Dice */
    .vqmm-dice {
        width: 84px;
        height: 84px;
        padding: 12px;
    }
    .vqmm-dice-dot {
        width: 13px;
        height: 13px;
    }
    .vqmm-dice-container {
        gap: 16px;
    }

    /* Coin */
    .vqmm-coin {
        width: 130px;
        height: 130px;
    }
    .vqmm-coin-labels {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    /* Team */
    .vqmm-team-results {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    /* Random password */
    .vqmm-rp-checkboxes {
        grid-template-columns: 1fr;
    }
    .vqmm-rp-display {
        padding: 12px 14px;
    }
    .vqmm-rp-password {
        font-size: 0.95em;
    }

    /* Random number */
    .vqmm-rn-result {
        font-size: 2.2em;
    }
    .vqmm-rn-range {
        flex-wrap: wrap;
        gap: 10px;
    }
    .vqmm-rn-multi-options {
        flex-wrap: wrap;
        gap: 12px;
    }

    /* Random word */
    .vqmm-rw-result {
        font-size: 1.3em;
    }

    /* Tools grid section */
    .vqmm-tools-section {
        padding: 48px 0;
    }
    .vqmm-tools-section .vqmm-section-title {
        font-size: 1.5em;
        margin-bottom: 28px;
    }
    .vqmm-tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    .vqmm-tool-card {
        padding: 24px 18px 22px;
    }

    /* SEO */
    .vqmm-tool-seo-content {
        padding: 40px 0;
    }

    /* Buttons */
    .vqmm-tool-btn {
        padding: 10px 24px;
        font-size: 0.92em;
    }
    .vqmm-tool-btn-secondary {
        padding: 8px 18px;
        font-size: 0.85em;
    }

    /* Tab bar */
    .vqmm-tool-tab {
        padding: 7px 12px;
        font-size: 0.82em;
    }
}

/* Small mobile */
@media (max-width: 600px) {
    /* Tool hero */
    .vqmm-tool-hero {
        padding: 24px 0 32px;
    }
    .vqmm-tool-hero-title {
        font-size: 1.2em;
    }
    .vqmm-tool-hero-subtitle {
        font-size: 0.8em;
    }

    /* Tool area */
    .vqmm-tool-area {
        padding: 20px 16px;
        margin: 0 10px;
        border-radius: 12px;
    }

    /* Dice */
    .vqmm-dice {
        width: 74px;
        height: 74px;
        padding: 10px;
        border-radius: 10px;
    }
    .vqmm-dice-dot {
        width: 11px;
        height: 11px;
    }
    .vqmm-dice-container {
        gap: 12px;
        padding: 12px 0 20px;
    }

    /* Coin */
    .vqmm-coin-stage {
        min-height: 160px;
        padding: 16px 0 24px;
    }
    .vqmm-coin {
        width: 120px;
        height: 120px;
    }
    .vqmm-coin-front,
    .vqmm-coin-back {
        font-size: 1.05em;
    }

    /* Team */
    .vqmm-team-results {
        grid-template-columns: 1fr;
    }
    .vqmm-team-config {
        flex-direction: column;
        gap: 10px;
    }
    .vqmm-team-input textarea {
        min-height: 100px;
        font-size: 0.88em;
    }

    /* Tools grid */
    .vqmm-tools-section {
        padding: 36px 0;
    }
    .vqmm-tools-section .vqmm-section-title {
        font-size: 1.3em;
        margin-bottom: 24px;
    }
    .vqmm-tools-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .vqmm-tool-card {
        flex-direction: row;
        text-align: left;
        padding: 18px 16px;
        gap: 14px;
    }
    .vqmm-tool-card-icon {
        width: 52px;
        height: 52px;
        font-size: 1.8em;
        border-radius: 12px;
        flex-shrink: 0;
        margin-bottom: 0;
    }
    .vqmm-tool-card-desc {
        margin-bottom: 6px;
    }

    /* SEO */
    .vqmm-tool-seo-content {
        padding: 28px 0;
    }
    .vqmm-tool-seo-content .vqmm-seo-body {
        font-size: 0.92em;
    }
    .vqmm-tool-seo-content .vqmm-seo-body h2 {
        font-size: 1.2em;
    }

    /* History */
    .vqmm-tool-history {
        max-height: 200px;
    }

    /* Modal */
    .vqmm-tool-result-modal-inner {
        padding: 28px 20px;
    }
    .vqmm-tool-result-modal-title {
        font-size: 1.3em;
    }
}

/* Very small mobile */
@media (max-width: 480px) {
    .vqmm-tool-hero-top {
        margin-bottom: 20px;
    }
    .vqmm-tool-area {
        padding: 16px 12px;
        margin: 0 8px;
    }

    /* Dice */
    .vqmm-dice {
        width: 66px;
        height: 66px;
        padding: 8px;
    }
    .vqmm-dice-dot {
        width: 10px;
        height: 10px;
    }
    .vqmm-dice-controls button {
        width: 32px;
        height: 32px;
        font-size: 0.88em;
    }

    /* Coin */
    .vqmm-coin {
        width: 100px;
        height: 100px;
    }
    .vqmm-coin-front,
    .vqmm-coin-back {
        font-size: 0.88em;
    }
    .vqmm-coin-stats {
        flex-direction: column;
        gap: 6px;
    }
    .vqmm-coin-stats-label {
        text-align: center;
    }

    /* Team */
    .vqmm-team-card-header {
        padding: 10px 14px;
        font-size: 0.88em;
    }
    .vqmm-team-card-members li {
        font-size: 0.82em;
        padding: 6px 0;
    }
    .vqmm-team-actions {
        gap: 8px;
    }

    /* Buttons */
    .vqmm-tool-btn {
        padding: 10px 20px;
        font-size: 0.88em;
        width: 100%;
    }
    .vqmm-tool-btn-secondary {
        padding: 8px 16px;
        font-size: 0.82em;
    }

    /* Tab bar */
    .vqmm-tool-tab-bar {
        padding: 3px;
    }
    .vqmm-tool-tab {
        padding: 6px 8px;
        font-size: 0.78em;
    }
}
