* {
    box-sizing: border-box;
}

body {
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    font-family: "Manrope", system-ui, -apple-system, sans-serif;
    line-height: 1.6;
}

.neon-glow {
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.5);
}

.neon-glow-hover:hover {
    box-shadow: 0 0 25px rgba(168, 85, 247, 0.7);
}

.neon-text-glow {
    text-shadow: 0 0 10px rgba(168, 85, 247, 0.7);
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(168, 85, 247, 0.4);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 15px rgba(168, 85, 247, 0.5);
    }
    50% {
        box-shadow: 0 0 25px rgba(168, 85, 247, 0.8);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out;
}

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

.game-card {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.game-card:hover {
    transform: scale(1.02) translateY(-4px);
    box-shadow: 0 10px 30px rgba(168, 85, 247, 0.3);
    border-color: var(--color-accent-primary);
}

/* SEO Content Typography - Theme aware */
.seo-content-block h2,
.seo-content-block h3 {
    color: var(--color-text-primary);
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}
.seo-content-block h2 { font-size: 1.5rem; }
.seo-content-block h3 { font-size: 1.25rem; }
.seo-content-block p { margin-bottom: 1rem; line-height: 1.6; color: var(--color-text-secondary); }

/* SEO Content Table Styles - Theme aware */
.seo-content-block table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1.5rem 0;
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    overflow: hidden;
}

.seo-content-block th,
.seo-content-block td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border-light);
    color: var(--color-text-secondary);
}

.seo-content-block th {
    background: rgba(168, 85, 247, 0.15);
    color: var(--color-text-primary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(168, 85, 247, 0.2);
}

.seo-content-block tr:last-child td {
    border-bottom: none;
}

.seo-content-block tr:hover td {
    background: var(--color-bg-secondary);
}

/* Responsive table */
@media (max-width: 768px) {
    .seo-content-block table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--color-bg-tertiary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent-primary);
}

/* Flash Messages - Prominent Error Alerts */
#flash-messages {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.flash-message {
    max-width: 600px;
    margin: 0 auto;
    padding: 1.5rem;
    border-radius: 1rem;
    text-align: center;
    pointer-events: auto;
    animation: fadeIn 0.3s ease-out;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 2px solid;
    position: relative;
}

.flash-message .close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: currentColor;
    font-size: 1.25rem;
    transition: all 0.2s;
}

.flash-message .close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.flash-error {
    background: rgba(220, 38, 38, 0.15);
    border-color: var(--color-accent-red);
    color: #fca5a5;
}

.flash-error::before {
    content: '';
    display: block;
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="%23ef4444"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-2-4.232-2h-10c-1.538 0-2.502 1.667-1.732 3L10.268 12c.77 1.333 2.694 2 4.232 2h10c1.538 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-2-4.232-2z"/></svg>') center/contain no-repeat;
}

.flash-error .error-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.flash-error .error-message {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.flash-error .error-contact {
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 136, 204, 0.2);
    border: 1px solid var(--color-telegram);
    border-radius: 0.5rem;
    color: #60a5fa;
    margin-top: 1rem;
}

.flash-error .error-contact a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
}

.flash-error .error-contact a:hover {
    text-decoration: underline;
    color: #60a5fa;
}

.flash-success {
    background: rgba(34, 197, 94, 0.15);
    border-color: var(--color-accent-green);
    color: #86efac;
}

.flash-info {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--color-accent-blue);
    color: #93c5fd;
}

.flash-warning {
    background: rgba(234, 179, 8, 0.15);
    border-color: var(--color-accent-yellow);
    color: #fde047;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.tour-overlay {
    position: fixed;
    inset: 0;
    background: transparent;
    z-index: 10000;
    pointer-events: none;
}

.tour-tooltip {
    position: fixed;
    z-index: 10002;
    max-width: 320px;
    background: rgba(17, 24, 39, 0.95);
    border: 1px solid rgba(250, 204, 21, 0.6);
    color: #f9fafb;
    padding: 14px 16px;
    border-radius: 14px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.tour-tooltip-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

.tour-skip-btn {
    padding: 6px 12px;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 10px;
    border: 1px solid rgba(250, 204, 21, 0.5);
    color: #fbbf24;
    background: rgba(17, 24, 39, 0.6);
    transition: all 0.2s ease;
}

.tour-skip-btn:hover {
    background: rgba(250, 204, 21, 0.15);
    color: #fde68a;
}

.tour-highlight,
input.tour-highlight,
textarea.tour-highlight,
select.tour-highlight,
button.tour-highlight {
    position: relative !important;
    z-index: 10001 !important;
    clip-path: none !important;
    overflow: visible !important;
    outline: 3px solid #fbbf24 !important;
    outline-offset: 4px !important;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.75), 0 0 20px rgba(251, 191, 36, 0.6) !important;
}

.tour-complete-center {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10003;
    background: rgba(17, 24, 39, 0.95);
    border: 1px solid rgba(34, 197, 94, 0.6);
    color: #d1fae5;
    padding: 18px 22px;
    border-radius: 16px;
    box-shadow: 0 22px 44px rgba(0, 0, 0, 0.5);
    font-weight: 700;
    text-align: center;
    max-width: 420px;
}

.tour-start-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10004;
    background: rgba(17, 24, 39, 0.98);
    border: 1px solid rgba(250, 204, 21, 0.35);
    color: #f9fafb;
    padding: 24px 28px;
    border-radius: 18px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
    max-width: 420px;
    text-align: center;
}

.tour-start-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 18px;
}

.tour-start-yes {
    padding: 8px 18px;
    border-radius: 12px;
    background: rgba(34, 197, 94, 0.25);
    border: 1px solid rgba(34, 197, 94, 0.6);
    color: #d1fae5;
    font-weight: 700;
}

.tour-start-no {
    padding: 8px 18px;
    border-radius: 12px;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.6);
    color: #fecaca;
    font-weight: 700;
}
