/* 🔷 KP TOPBAR */
* {
    font-family: "Inter", sans-serif;
}
.kp-topbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: #0a2a43;
    color: white;
}

/* 🔙 Back button */
.kp-topbar .back-btn {
    font-family: "Sora", sans-serif;
    flex-shrink: 0;
}

/* 🔥 TITLE */
.kp-title {
    font-family: "Sora", sans-serif;
    flex: 1;
    text-align: center;

    white-space: nowrap; /* ❗ prevents line break */
    overflow: hidden;
    text-overflow: ellipsis;

    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* 🔹 Small screen refinement */
@media (max-width: 400px) {
    .kp-title {
        font-size: 16px;
    }

    .kp-topbar .back-btn {
        padding: 6px 10px;
        font-size: 13px;
    }
}
.app-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    scroll-behavior: smooth;
}

/* 🔷 BACK BUTTON */
.back-btn {
    font-family: "Sora", sans-serif;
    background: #123d5c;
    border: none;
    color: white;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.back-btn:hover {
    background: #0f2b44;
    transform: scale(1.05);
}

/* 🔷 MAIN CONTAINER */
.kp-container {
    max-width: 950px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* 🔷 EACH SECTION */
.kp-section {
    text-align: left;
    animation: fadeIn 0.6s ease forwards;
}

/* 🔷 SECTION TITLE */
.kp-section-title {
    font-family: "Sora", sans-serif;
    font-size: 14px;
    letter-spacing: 1px;
    color: green;
    margin-bottom: 12px;
    font-weight: 700;
    padding-left: 6px;
    border-left: 4px solid #0a2a43;
}

/* 🔥 GRID INSIDE SECTION */
.kp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
}

/* 🔥 CARDS */
.kp-card {
    background: #0a2a43;
    color: white;
    padding: 20px 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
}

.kp-card:hover {
    background: #06325b;
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

/* 🔹 Subtle stagger feel (optional polish) */
.kp-card:nth-child(odd) {
    animation: fadeIn 0.5s ease;
}

.kp-card:nth-child(even) {
    animation: fadeIn 0.7s ease;
}

/* 🔹 Mobile optimization */
@media (max-width: 500px) {
    .kp-container {
        gap: 22px;
    }

    .kp-section-title {
        font-size: 13px;
    }
}
/* 🔷 OVERLAY BACKDROP */
.kp-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    animation: fadeIn 0.25s ease;
}

/* 🔷 MODAL BOX */
.kp-modal {
    background: white;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    border-radius: 14px;
    overflow-y: auto;
    animation: scaleIn 0.25s ease;
}
/* 🔷 MODAL HEADER (STICKY) */
.kp-modal-header {
    font-family: "Sora", sans-serif;
    position: sticky;
    top: 0;
    z-index: 5; /* 🔼 stronger layering */
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 16px 20px; /* ✅ now controls spacing */
    margin: 0; /* ❌ remove margin */
    border-bottom: 1px solid #eee;
    /* 🔥 subtle shadow to hide scrolling content */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* 🔷 TITLE */
.kp-modal-title {
    font-family: "Inter", sans-serif;
    margin: 0;
    color: #0a2a43;
    font-size: 18px;
}

/* ❌ CLOSE BUTTON */
.kp-close-btn {
    background: transparent;
    border: none;

    font-size: 28px; /* 🔼 bigger */
    font-weight: bold;

    color: #0a2a43;
    cursor: pointer;

    padding: 6px 10px; /* slightly larger hit area */
    border-radius: 8px;

    transition: all 0.2s ease;
}

.kp-close-btn:hover {
    background: #f0f0f0;
    transform: scale(1.1);
}
/* 🔥 TOPIC LIST */
.kp-topic-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 20px 20px;
}

/* 🔥 TOPIC CARD */
.kp-topic-card {
    font-family: "Inter", sans-serif;
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 14px;
    border-radius: 10px;
    background: #0a2a43;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;

    font-size: 16px; /* ✅ bigger text */
    line-height: 1.4;
}

/* 🔢 NUMBER */
.kp-topic-number {
    font-weight: 700;
    opacity: 0.8;
}

/* 📝 TEXT */
.kp-topic-text {
    flex: 1;
}

/* 🔥 HOVER */
.kp-topic-card:hover {
    background: #06325b;
    transform: scale(1.02);
}

/* 🔥 BLUR BACKGROUND */
.blurred {
    filter: blur(4px);
    pointer-events: none;
    user-select: none;
}
