/* Duris Cards - Modal Styles (modals, tooltips, overlays) */
/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 200;
    justify-content: center;
    align-items: center;
}
.modal.active { display: flex; }
.modal-content {
    background: linear-gradient(180deg, var(--bg-panel) 0%, var(--bg-medium) 100%);
    padding: 20px;
    border-radius: 12px;
    max-width: 500px;
    width: 95%;
    text-align: center;
    border: 3px solid var(--border-bronze);
    box-shadow:
        0 0 60px rgba(0,0,0,0.9),
        0 0 30px rgba(201,162,39,0.1),
        inset 0 1px 0 rgba(255,255,255,0.08);
    position: relative;
}
/* Ornate corner decorations */
.modal-content::before {
    content: '❖';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--gold);
    font-size: 20px;
    text-shadow: 0 0 10px rgba(201,162,39,0.6);
    background: var(--bg-panel);
    padding: 0 10px;
}
.modal-content h2 {
    font-family: 'Cinzel', serif;
    color: var(--gold);
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    margin-bottom: 20px;
    letter-spacing: 2px;
}
.modal-content.wide { max-width: 700px; text-align: left; }
.modal h2 { margin-bottom: 20px; color: var(--gold); }
.modal input[type="text"],
.modal input[type="email"],
.modal input[type="password"] {
    font-family: 'Crimson Text', serif;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid var(--border-bronze);
    border-radius: 6px;
    background: var(--bg-dark);
    color: var(--text-light);
    width: 250px;
    margin-bottom: 15px;
}
.modal input[type="text"]:focus,
.modal input[type="email"]:focus,
.modal input[type="password"]:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 10px rgba(201,162,39,0.3);
}

/* Mulligan Overlay */
.mulligan-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 300;
    justify-content: center;
    align-items: center;
}
.mulligan-overlay.active { display: flex; }
.mulligan-content {
    background: linear-gradient(180deg, var(--bg-panel) 0%, var(--bg-medium) 100%);
    padding: 30px 40px;
    border-radius: 12px;
    text-align: center;
    border: 3px solid var(--gold);
    box-shadow: 0 0 60px rgba(201,162,39,0.3);
}
.mulligan-content h2 {
    font-family: 'Cinzel', serif;
    color: var(--gold);
    margin-bottom: 10px;
}
.mulligan-content p {
    color: var(--text-muted);
    margin-bottom: 20px;
}
.mulligan-cards {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.mulligan-card {
    width: 100px;
    height: 140px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    border: 3px solid transparent;
}
.mulligan-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}
.mulligan-card.keep {
    border-color: #22c55e;
    box-shadow: 0 0 15px rgba(34,197,94,0.5);
}
.mulligan-card.replace {
    border-color: #ef4444;
    box-shadow: 0 0 15px rgba(239,68,68,0.5);
    opacity: 0.7;
}
.mulligan-card.replace::after {
    content: '✗';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    color: #ef4444;
    text-shadow: 0 0 10px rgba(0,0,0,0.8);
}
.mulligan-card.keep::after {
    content: '✓';
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 20px;
    color: #22c55e;
    text-shadow: 0 0 5px rgba(0,0,0,0.8);
}
.mulligan-info {
    margin-bottom: 15px;
    color: var(--text-muted);
    font-size: 14px;
}
.btn-lg {
    padding: 12px 30px;
    font-size: 18px;
}

/* Card Preview Tooltip - Shows enlarged card on hover */
.card-tooltip {
    display: none;
    position: fixed;
    z-index: var(--z-tooltip);
    pointer-events: none;
    filter: drop-shadow(0 8px 24px rgba(0,0,0,0.8)) drop-shadow(0 0 20px rgba(201,162,39,0.3));
}
.card-tooltip.active { display: block; }

/* Enlarged card inside tooltip */
.card-tooltip .card {
    width: 170px;
    height: 240px;
    transform: none;
    cursor: default;
}
.card-tooltip .card:hover {
    transform: none;
}
.card-tooltip .card .mana-cost {
    width: 36px;
    height: 36px;
    font-size: 18px;
    top: -8px;
    left: -8px;
}
.card-tooltip .card .card-class-icon {
    width: 28px;
    height: 28px;
    font-size: 14px;
    top: -6px;
    right: -6px;
}
.card-tooltip .card .card-name {
    font-size: 10px;
    padding: 3px;
    flex-grow: 0;
}
.card-tooltip .card .card-image {
    min-height: 100px;
    max-height: 140px;
}
.card-tooltip .card .card-text {
    font-size: 10px;
    max-height: 40px;
}
.card-tooltip .card .keywords {
    font-size: 10px;
}
.card-tooltip .card .stats {
    padding: 6px;
}
.card-tooltip .card .attack,
.card-tooltip .card .health {
    font-size: 16px;
}
.card-tooltip .card .card-tribe {
    font-size: 9px;
}
/* Tooltip keyword legend */
.tooltip-keywords {
    background: linear-gradient(180deg, rgba(30,25,20,0.95) 0%, rgba(20,15,10,0.98) 100%);
    border: 1px solid var(--border-bronze);
    border-radius: 6px;
    padding: 8px 10px;
    margin-top: 8px;
    max-width: 200px;
}
.tooltip-kw {
    font-size: 11px;
    color: var(--text-light);
    padding: 3px 0;
    line-height: 1.3;
}
.tooltip-kw b {
    color: var(--gold);
}

/* Info Bubble - reusable popup for spell info, errors, etc */
.info-bubble {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: var(--z-tooltip);
    justify-content: center;
    align-items: center;
}
.info-bubble.active { display: flex; }
.info-bubble-content {
    background: linear-gradient(180deg, var(--bg-panel) 0%, var(--bg-dark) 100%);
    border: 2px solid var(--gold);
    border-radius: var(--radius-lg);
    padding: 20px 25px;
    max-width: 320px;
    width: 90%;
    text-align: center;
    box-shadow: 0 0 40px rgba(0,0,0,0.8), 0 0 20px rgba(201,162,39,0.2);
    position: relative;
    animation: bubbleAppear 0.2s ease-out;
}
@keyframes bubbleAppear {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.info-bubble-title {
    font-family: var(--font-family-display);
    font-size: var(--font-size-lg);
    color: var(--gold);
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}
.info-bubble-text {
    font-family: var(--font-family-body);
    font-size: var(--font-size-sm);
    color: var(--text-light);
    line-height: 1.4;
    margin-bottom: 15px;
    white-space: pre-line;
}
.info-bubble-close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    padding: 2px 6px;
}
.info-bubble-close:hover { color: var(--gold); }

/* Help button */
.help-btn {
    position: static;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #ffd700;
    color: #000;
    font-size: 18px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    box-shadow: 0 3px 15px rgba(255,215,0,0.4);
    z-index: 100;
    transition: transform 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.help-btn:hover { transform: scale(1.1); }
.help-section { margin: 15px 0; }
.help-section h3 { color: #4fc3f7; margin-bottom: 8px; font-size: 14px; }
.help-section p, .help-section li { font-size: 13px; color: #ccc; line-height: 1.5; }
.help-section ul { margin-left: 20px; }
