/* Base Styles & CSS Variables */
:root {
    --bg-color: #0f172a;
    --panel-bg: rgba(30, 41, 59, 0.7);
    --panel-border: rgba(255, 255, 255, 0.1);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --color-x: #22d3ee;
    --color-o: #e879f9;
    --glow-x: 0 0 10px rgba(34, 211, 238, 0.5);
    --glow-o: 0 0 10px rgba(232, 121, 249, 0.5);
    --card-bg: #1e293b;
    --card-border: #334155;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    /* overflow managed per-screen so phones can scroll game layout */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
}

/* Screens */
.screen {
    display: none;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    flex-direction: column;
    overflow: hidden;
}

.screen.active {
    display: flex;
}

/* Glassmorphism Panels */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Lobby */
#lobby-screen {
    justify-content: center;
    align-items: center;
}

#lobby-screen .glass-panel {
    width: 90%;
    max-width: 400px;
}

h1 {
    margin-bottom: 0.5rem;
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--color-x), var(--color-o));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.lobby-actions {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.lobby-actions.hidden {
    display: none;
}

.divider {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0.5rem 0;
}

.join-group {
    display: flex;
    gap: 0.5rem;
}

input {
    flex: 1;
    min-width: 0;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    color: white;
    font-size: 1rem;
    text-transform: uppercase;
    outline: none;
    transition: border-color 0.2s;
}

input:focus {
    border-color: var(--color-x);
}

.error-text {
    color: #ef4444;
    margin-top: 1rem;
    font-size: 0.875rem;
    min-height: 1.25rem;
}

/* Queue searching state */
.queue-searching {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.queue-searching.hidden {
    display: none;
}

.searching-text {
    font-size: 1rem;
    color: var(--text-secondary);
    animation: pulse 1.5s ease-in-out infinite;
}

.searching-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--card-border);
    border-top-color: var(--color-x);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.guide-link {
    display: inline-block;
    margin-top: 1.2rem;
    color: #22d3ee;
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.8;
    transition: opacity 0.2s;
}
.guide-link:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(139, 92, 246, 0.39);
}

.btn-secondary {
    background: var(--card-border);
    color: white;
}

.action-btn {
    background: #10b981;
    color: white;
    box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.39);
}

/* Game Screen */
.game-header {
    margin: 1rem;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.symbol-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.1);
}

.symbol-badge.x {
    color: var(--color-x);
    text-shadow: var(--glow-x);
}

.symbol-badge.o {
    color: var(--color-o);
    text-shadow: var(--glow-o);
}

.turn-indicator {
    font-weight: 600;
    font-size: 1.125rem;
    transition: color 0.3s;
}

.turn-indicator.x-turn {
    color: var(--color-x);
    text-shadow: var(--glow-x);
}

.turn-indicator.o-turn {
    color: var(--color-o);
    text-shadow: var(--glow-o);
}

.game-layout {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 0 1rem 1rem 1rem;
    gap: 1rem;
}

.opponent-area,
.player-area {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.opponent-area {
    align-items: center;
    opacity: 0.8;
}

.deck-info {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.deck-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    z-index: 5;
}

/* Hand UI */
.hand-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    min-height: 120px;
    perspective: 1000px;
    width: 100%;
    padding-bottom: 2rem;
}

/* Cards */
.playing-card {
    width: 80px;
    height: 110px;
    border-radius: 8px;
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    position: relative;
    overflow: visible;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.playing-card:hover:not(.disabled):not(.hidden-card) {
    transform: translateY(-10px) rotate(2deg);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    z-index: 10;
    border-color: #64748b;
}

.playing-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.playing-card.selected {
    transform: translateY(-15px) scale(1.05);
    border-color: white;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
    z-index: 10;
}

.playing-card.hidden-card {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border-color: #334155;
}

.playing-card.hidden-card::after {
    content: "🃏";
    font-size: 2rem;
    opacity: 0.2;
}

/* Card Content Styling */
.card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    text-align: center;
    width: 100%;
    padding: 0.25rem;
}

/* Card corners — position number top-left and bottom-right */
.card-corner {
    position: absolute;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-secondary);
    line-height: 1;
}

.card-corner-tl {
    top: 6px;
    left: 8px;
}

.card-corner-br {
    bottom: 6px;
    right: 8px;
    transform: rotate(180deg);
}

.card-pos-symbol {
    font-size: 2.5rem;
    font-weight: bold;
    z-index: 1;
    position: relative;
}

.card-pos-symbol.x {
    color: var(--color-x);
    text-shadow: var(--glow-x);
}

.card-pos-symbol.o {
    color: var(--color-o);
    text-shadow: var(--glow-o);
}

.card-effect-emoji {
    font-size: 2rem;
}

.card-effect-name {
    font-size: 0.7rem;
    font-weight: bold;
    /* always visible — no hover on touch devices */
    display: block;
}

/* Card info button (effect cards in hand) */
.card-info-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: var(--text-secondary);
    font-size: 10px;
    line-height: 1;
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.15s, color 0.15s;
}

.card-info-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    color: var(--text-primary);
}

/* Tooltip bubble */
.card-tooltip {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    width: 160px;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 0.72rem;
    line-height: 1.4;
    color: var(--text-primary);
    text-align: left;
    z-index: 200;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s, visibility 0.15s;
}

/* Show on desktop hover over the info button */
.card-info-btn:hover ~ .card-tooltip,
/* Show on mobile tap (class toggled via JS) */
.playing-card.card-tooltip-active .card-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Board */
.board-area {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.tic-tac-toe-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1 / 1;
}

.tile {
    background: var(--panel-bg);
    border-radius: 12px;
    border: 2px solid var(--card-border);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 4rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.tile.x {
    color: var(--color-x);
    text-shadow: var(--glow-x);
}

.tile.o {
    color: var(--color-o);
    text-shadow: var(--glow-o);
}

.tile.blocked::after {
    content: "🚫";
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 1rem;
}

/* Muted tile — symbol turns gray and 🔕 appears in corner */
.tile.muted .tile-symbol {
    color: #6b7280 !important;
    text-shadow: none;
    transition: color 0.3s, filter 0.3s;
}

.tile.muted::after {
    content: "🔕";
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 1rem;
}

/* Board tile number label */
.tile-number {
    position: absolute;
    top: 6px;
    left: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.25);
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

/* Board tile symbol (X / O) */
.tile-symbol {
    font-size: 3rem;
    font-weight: bold;
    line-height: 1;
}

.tile.x .tile-symbol {
    color: var(--color-x);
    text-shadow: var(--glow-x);
}

.tile.o .tile-symbol {
    color: var(--color-o);
    text-shadow: var(--glow-o);
}

.tile.highlight-target {
    border-color: #10b981;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
    cursor: crosshair;
}

.tile.highlight-target:hover {
    background: rgba(16, 185, 129, 0.2);
}

.tile.win-line {
    animation: pulseWin 1.5s infinite;
}

@keyframes pulseWin {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
        z-index: 2;
        border-color: white;
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

/* ── Room Code Share Modal ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}
.modal-overlay.hidden {
    display: none;
}
.room-code-panel {
    text-align: center;
    max-width: 360px;
    padding: 2rem;
    animation: modalIn 0.3s ease;
}
@keyframes modalIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.room-code-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin: 1rem 0;
}
.room-code-display span {
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: 0.5rem;
    color: #22d3ee;
    font-family: monospace;
}
.btn-copy {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
}
.copy-feedback {
    font-size: 0.8rem;
    min-height: 1.2rem;
    color: #4ade80;
}
.modal-hint {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-bottom: 1rem;
}

/* Target Overlay */
.overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 20;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 2rem;
    pointer-events: none;
    /* clicks pass through to board tiles */
}

.overlay.hidden {
    display: none;
}

.overlay-text {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: #10b981;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
    background: rgba(0, 0, 0, 0.8);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    pointer-events: auto;
    /* re-enable for text readability */
}

/* Result Screen */
#result-screen {
    justify-content: center;
    align-items: center;
    background: rgba(15, 23, 42, 0.9);
    z-index: 30;
}

.result-panel {
    width: 90%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#result-title {
    font-size: 3rem;
    margin-bottom: 0;
}

#result-title.win-x {
    color: var(--color-x);
    text-shadow: var(--glow-x);
}

#result-title.win-o {
    color: var(--color-o);
    text-shadow: var(--glow-o);
}

#result-message {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

.status-text {
    font-size: 0.875rem;
    color: #10b981;
    min-height: 1.25rem;
}

/* ── Responsive — narrow phones (≤500px) ─────────────────── */
@media (max-width: 500px) {
    .game-header {
        margin: 0.5rem;
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }

    .turn-indicator {
        font-size: 0.875rem;
        /* take full width row so long messages don't squash room/symbol */
        flex-basis: 100%;
        text-align: center;
        order: -1;
    }

    .playing-card {
        width: 60px;
        height: 85px;
    }

    .card-pos-symbol {
        font-size: 1.8rem;
    }

    .card-effect-emoji {
        font-size: 1.5rem;
    }

    .card-effect-name {
        font-size: 0.55rem;
    }

    .tic-tac-toe-board {
        gap: 5px;
    }

    .tile {
        font-size: 3rem;
        border-radius: 8px;
    }

    .overlay-text {
        font-size: 1rem;
        padding: 0.35rem 0.75rem;
        margin-bottom: 0.5rem;
    }

    .hand-container {
        min-height: 90px;
        padding-bottom: 1rem;
    }
}

/* ── Landscape phones (height ≤ 500px) ───────────────────── */
@media (max-height: 500px) and (orientation: landscape) {
    .game-header {
        margin: 0.25rem 0.5rem;
        padding: 0.25rem 0.75rem;
        font-size: 0.75rem;
    }

    .turn-indicator {
        font-size: 0.75rem;
    }

    /* hide opponent hand cards, keep only deck count */
    #opponent-hand {
        display: none;
    }

    .opponent-area {
        flex-direction: row;
        gap: 0.5rem;
        align-items: center;
    }

    .playing-card {
        width: 50px;
        height: 70px;
    }

    .card-pos-symbol {
        font-size: 1.4rem;
    }

    .card-effect-emoji {
        font-size: 1.1rem;
    }

    .card-effect-name {
        font-size: 0.45rem;
    }

    .tic-tac-toe-board {
        gap: 4px;
        max-width: 260px;
    }

    .hand-container {
        min-height: 75px;
        padding-bottom: 0.25rem;
    }

    .game-layout {
        gap: 0.25rem;
        padding: 0 0.5rem 0.25rem;
    }

    .overlay-text {
        font-size: 0.85rem;
        padding: 0.25rem 0.6rem;
    }
}

/* ── Relocate Card Animations ─────────────────────────────── */
@keyframes relocateOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0;
        transform: scale(0.6) translateY(-8px);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes relocateIn {
    0% {
        opacity: 0;
        transform: scale(0.6) translateY(12px);
    }

    70% {
        opacity: 1;
        transform: scale(1.07) translateY(-2px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.tile-relocate-out {
    animation: relocateOut 0.35s ease-in-out forwards;
}

.tile-relocate-in {
    animation: relocateIn 0.4s 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* ── Graveyard Picker Modal (Revive card) ─────────────────── */
.graveyard-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 50;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}

.graveyard-overlay.hidden {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.96);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.graveyard-modal {
    background: rgba(20, 30, 50, 0.95);
    border: 1px solid rgba(134, 239, 172, 0.35);
    border-radius: 16px;
    padding: 1.5rem;
    max-width: 380px;
    width: calc(100% - 2rem);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 0 0 40px rgba(134, 239, 172, 0.15);
}

.graveyard-modal-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #86efac;
    text-align: center;
}

.graveyard-card-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
    max-height: 220px;
    overflow-y: auto;
}

.graveyard-card-item {
    width: 76px;
    height: 96px;
    border-radius: 8px;
    background: #1e293b;
    border: 2px solid #334155;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    cursor: pointer;
    transition: all 0.18s ease;
    font-size: 0.75rem;
}

.graveyard-card-item:hover {
    border-color: #86efac;
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 0 14px rgba(134, 239, 172, 0.4);
}

.graveyard-card-item .gc-symbol {
    font-size: 1.8rem;
    font-weight: bold;
}

.graveyard-card-item .gc-symbol.x {
    color: var(--color-x);
    text-shadow: var(--glow-x);
}

.graveyard-card-item .gc-symbol.o {
    color: var(--color-o);
    text-shadow: var(--glow-o);
}

.graveyard-card-item .gc-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
}
/* ── Graveyard Button ─────────────────────────────────────── */
.graveyard-btn {
    padding: 0.3rem 0.6rem;
    font-size: 1.1rem;
    line-height: 1;
    border-radius: 8px;
    min-width: unset;
}

/* ── Graveyard Panel Modal ───────────────────────────────── */
.graveyard-panel-modal {
    max-width: 460px;
    width: calc(100% - 2rem);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border-color: rgba(148, 163, 184, 0.3);
    box-shadow: 0 0 40px rgba(148, 163, 184, 0.12);
}

.graveyard-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.graveyard-close-btn {
    padding: 0.25rem 0.6rem;
    font-size: 0.85rem;
    line-height: 1;
}

.graveyard-panel-sections {
    display: flex;
    gap: 1rem;
    overflow: hidden;
    flex: 1;
    min-height: 0;
}

.graveyard-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
}

.graveyard-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    padding-bottom: 0.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.graveyard-log-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    overflow-y: auto;
    max-height: 240px;
    padding-right: 0.25rem;
}

.graveyard-log-entry {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 6px;
    padding: 0.35rem 0.5rem;
    font-size: 0.78rem;
}

.graveyard-log-entry .gle-emoji {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.graveyard-log-entry .gle-name {
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.graveyard-log-entry .gle-reason {
    font-size: 0.7rem;
    color: var(--text-secondary);
    flex-shrink: 0;
    text-align: right;
}

.graveyard-log-entry.gle-destroyed .gle-reason {
    color: #ef4444;
}

.graveyard-log-entry.gle-played .gle-reason {
    color: #86efac;
}

.graveyard-log-empty {
    font-size: 0.78rem;
    color: var(--text-secondary);
    text-align: center;
    padding: 0.5rem 0;
    opacity: 0.6;
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    pointer-events: none;
}

.toast {
    background: rgba(30, 41, 59, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 0.65rem 1.25rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    text-align: center;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    max-width: 380px;
    min-width: 200px;
    word-break: break-word;
}

.toast.toast-visible {
    opacity: 1;
    transform: translateY(0);
}
