/* ===== User Guide Modal ===== */
.user-guide-content {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.98) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(99, 102, 241, 0.3);
    display: flex;
    flex-direction: column;
}

.guide-header {
    text-align: center;
    margin-bottom: 1.25rem;
}

.guide-logo {
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
    display: flex;
    justify-content: center;
    align-items: center;
}

.guide-logo img {
    filter: drop-shadow(0 4px 8px rgba(99, 102, 241, 0.5));
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.guide-title {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    color: #ffffff !important;
    text-shadow: none !important;
}

.guide-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
    line-height: 1.45;
}

.guide-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.25rem;
    flex-shrink: 0;
}

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

.feature-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.feature-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.feature-image {
    width: 100%;
    height: 150px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.feature-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    z-index: 2;
}

.feature-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    z-index: 1;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(168, 85, 247, 0.2) 100%);
}

.feature-card:nth-child(2) .feature-placeholder {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.2) 0%, rgba(217, 70, 239, 0.2) 100%);
}

.feature-card:nth-child(3) .feature-placeholder {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(16, 185, 129, 0.2) 100%);
}

.feature-card:nth-child(4) .feature-placeholder {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(217, 119, 6, 0.2) 100%);
}

.feature-card:hover .feature-image img {
    transform: scale(1.05);
}

.feature-content {
    padding: 1.25rem;
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
}

.feature-description {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
}

.guide-footer {
    text-align: center;
    margin-top: 0.4rem;
    flex-shrink: 0;
}

.guide-start-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
    padding: 1rem 3rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
    margin-bottom: 1rem;
}

.guide-start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.6);
}

.guide-tip {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

.guide-banner {
    margin: 1rem 0 !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    box-shadow: 0 8px 24px rgba(2, 6, 23, 0.35) !important;
    border: 1px solid rgba(148, 163, 184, 0.22);
}

#user-guide-close {
    position: sticky;
    top: 0.25rem;
    margin-left: auto;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2;
}

/* Mobile: keep guide inside one screen card */
@media (max-width: 768px) {
    #user-guide-modal {
        align-items: center !important;
        justify-content: center !important;
        padding: 12px;
    }

    .user-guide-content {
        width: min(100%, 560px);
        max-height: calc(100dvh - 24px);
        border-radius: 20px;
        padding: 0.9rem 0.9rem 1rem;
    }

    .guide-logo {
        margin-bottom: 0.5rem;
    }

    .guide-logo img {
        width: 62px !important;
        height: 62px !important;
    }

    .guide-title {
        font-size: 1.35rem !important;
        letter-spacing: 0.01em !important;
    }

    .guide-subtitle {
        font-size: 0.84rem;
    }

    .guide-banner {
        margin: 0.7rem 0 !important;
    }

    .guide-features {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.65rem;
        margin-bottom: 0.7rem;
    }

    .feature-card {
        display: grid;
        grid-template-columns: 84px 1fr;
        align-items: stretch;
        min-width: 0;
    }

    .feature-image {
        height: auto;
        min-height: 84px;
    }

    .feature-placeholder {
        font-size: 42px;
    }

    .feature-content {
        padding: 0.65rem 0.7rem;
    }

    .feature-title {
        font-size: 0.96rem;
        margin-bottom: 0.22rem;
    }

    .feature-description {
        font-size: 0.78rem;
        line-height: 1.35;
    }

    .guide-start-btn {
        width: 100%;
        padding: 0.8rem 1rem;
        border-radius: 10px;
        font-size: 0.98rem;
        margin-bottom: 0.6rem;
    }

    .guide-tip {
        font-size: 0.76rem;
        line-height: 1.4;
    }
}

/* Light mode palette */
[data-theme="light"] .user-guide-content {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
    border-color: rgba(15, 23, 42, 0.1);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
}

[data-theme="light"] #user-guide-close {
    color: #334155;
    background: rgba(241, 245, 249, 0.95);
}

[data-theme="light"] .guide-logo img {
    filter: drop-shadow(0 4px 8px rgba(99, 102, 241, 0.28));
}

[data-theme="light"] .guide-title {
    background: none;
    -webkit-text-fill-color: #0f172a;
    color: #0f172a !important;
}

[data-theme="light"] .guide-subtitle {
    color: #475569;
}

[data-theme="light"] .guide-banner {
    border-color: rgba(15, 23, 42, 0.1);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12) !important;
}

[data-theme="light"] .feature-card {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .feature-card:hover {
    background: #ffffff;
    border-color: rgba(99, 102, 241, 0.45);
    box-shadow: 0 10px 24px rgba(99, 102, 241, 0.2);
}

[data-theme="light"] .feature-image {
    background: rgba(15, 23, 42, 0.03);
}

[data-theme="light"] .feature-title {
    color: #0f172a;
}

[data-theme="light"] .feature-description {
    color: #475569;
}

[data-theme="light"] .guide-tip {
    color: #64748b;
}

/* Logo hover effect */
.logo-container:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.15);
}

.logo-container {
    transition: all 0.3s ease;
}