/* Animation Engine Configurations */
@keyframes textScaleUp {
    0% { opacity: 0; transform: scale(0.98); filter: blur(3px); }
    100% { opacity: 1; transform: scale(1); filter: blur(0); }
}

.stagger-active {
    opacity: 0;
    animation: elegantFadeInUp 0.8s var(--ease-out-expo) both;
}

.animate-text {
    opacity: 0;
    animation: textScaleUp 0.6s var(--ease-out-expo) forwards;
}

.animate-scale {
    opacity: 0;
    transform: scale(0.96);
    animation: textScaleUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Modal Overlay & Base Structure */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(3, 5, 10, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s var(--ease-out-expo), visibility 0.4s var(--ease-out-expo);
}
.modal-overlay.active { opacity: 1; visibility: visible; }

.modal-content {
    width: 90%;
    max-width: 900px;
    background: #070a13;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 50px 100px rgba(0,0,0,0.6);
    transform: scale(0.96) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 85vh;
    overflow-y: auto;
    overflow-x: hidden;
}
.modal-overlay.active .modal-content { transform: scale(1) translateY(0); }

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    position: sticky;
    top: -40px;
    background: #070a13;
    z-index: 50;
    padding: 10px 0 15px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.top-btn {
    background: transparent;
    border: none;
    color: var(--goku-gold);
    font-size: 1.3rem;
    cursor: pointer;
    transition: transform 0.2s var(--ease-out-expo);
    outline: none;
}
.top-btn:hover { transform: scale(1.08); }
#modalBackBtn { visibility: hidden; }

.modal-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    color: #fff;
    letter-spacing: 5px;
    font-weight: 900;
}
.modal-title span { color: var(--goku-gold); }

/* View Sections Staggered Item Animation Trigger when Active */
.view-section { display: none; text-align: left; }
.view-section.active { display: block; }

/* Staggered transition on home view items entry */
.view-section.active .mod-btn {
    animation: elegantFadeInUp 0.8s var(--ease-out-expo) both;
}
.view-section.active .mod-btn:nth-child(1) { animation-delay: 0.04s; }
.view-section.active .mod-btn:nth-child(2) { animation-delay: 0.08s; }
.view-section.active .mod-btn:nth-child(3) { animation-delay: 0.12s; }
.view-section.active .mod-btn:nth-child(4) { animation-delay: 0.16s; }
.view-section.active .mod-btn:nth-child(5) { animation-delay: 0.2s; }
.view-section.active .mod-btn:nth-child(6) { animation-delay: 0.24s; }

.modal-info {
    font-size: 0.95rem;
    color: #94a3b8;
    margin-bottom: 35px;
    line-height: 1.7;
    background: rgba(255, 255, 255, 0.01);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.04);
    text-align: center;
}

.modal-btn-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.mod-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 24px;
    font-size: 0.85rem;
    color: #cbd5e1;
    text-decoration: none;
    font-family: 'Orbitron', sans-serif;
    background: rgba(255,255,255,0.01);
    border-radius: 18px;
    transition: all 0.3s var(--ease-out-expo);
    border: 1px solid rgba(255,255,255,0.04);
    letter-spacing: 2px;
    opacity: 0;
}
.mod-btn i { font-size: 1.5rem; color: var(--goku-gold); }
.mod-btn:hover {
    color: #fff;
    background: rgba(255,255,255,0.02);
    transform: translateY(-4px);
    border-color: rgba(56, 189, 248, 0.3);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Mod APK Panel Search Block */
.search-box {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    position: sticky;
    top: 40px;
    z-index: 40;
    background: #070a13;
    padding: 10px 0;
    width: 100%;
}
.search-box input {
    flex: 1;
    min-width: 0;
    padding: 16px 20px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    color: #fff;
    outline: none;
    font-size: 0.95rem;
    transition: all 0.3s var(--ease-out-expo);
}
.search-box input:focus {
    border-color: var(--goku-gold);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.1);
}
.search-box button {
    flex-shrink: 0;
    padding: 16px 26px;
    background: var(--goku-blue);
    border: none;
    border-radius: 14px;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s var(--ease-out-expo);
}
.search-box button:hover {
    transform: scale(1.03);
}

/* Dynamic Details Screens */
.detail-screen-card {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.detail-img {
    width: 100%;
    max-height: 280px;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.06);
}
.detail-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.4rem;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding-bottom: 12px;
}
.detail-desc {
    font-size: 0.95rem;
    color: #94a3b8;
    line-height: 1.7;
}
.detail-actions-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 10px;
}

/* Grids: Tools, Courses, & Web Store */
.tools-grid-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.courses-grid, .webstore-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 15px;
}

.course-card, .web-card {
    background: rgba(255,255,255,0.01);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 20px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.4s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
}
.course-card:hover, .web-card:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 189, 248, 0.25);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

.course-header, .web-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.course-badge, .web-badge {
    font-size: 0.65rem;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
}
.badge-free { background: rgba(16, 185, 129, 0.1); color: var(--emerald-green); border: 1px solid rgba(16, 185, 129, 0.2); }
.badge-premium { background: rgba(56, 189, 248, 0.1); color: var(--goku-gold); border: 1px solid rgba(56, 189, 248, 0.2); }

.course-icon {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-size: 2.2rem;
    color: var(--goku-gold);
    margin-bottom: 14px;
}

.course-title, .web-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    color: #fff;
    margin-bottom: 10px;
}
.course-desc, .web-desc {
    font-size: 0.82rem;
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 20px;
}

.course-footer, .web-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.course-price, .web-price {
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.1rem;
    color: #fff;
}
.price-strike { text-decoration: line-through; color: #475569; font-size: 0.8rem; margin-right: 6px; }

/* Card Call-To-Action Controls */
.course-btn, .web-btn {
    text-decoration: none;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 10px 18px;
    border-radius: 8px;
    border: 1px solid;
    transition: all 0.2s var(--ease-out-expo);
    outline: none;
}
.btn-learn { background: rgba(56, 189, 248, 0.05); border-color: rgba(56, 189, 248, 0.2); color: var(--goku-gold); }
.btn-learn:hover { background: var(--goku-blue); color: #fff; border-color: var(--goku-blue); }

.btn-buy { background: rgba(16, 185, 129, 0.05); border-color: rgba(16, 185, 129, 0.2); color: var(--emerald-green); }
.btn-buy:hover { background: var(--emerald-green); color: #000; border-color: var(--emerald-green); }

/* Tool Lists Layouts */
.list-item {
    display: flex;
    flex-direction: column;
    background: rgba(255,255,255,0.01);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 14px;
    padding: 18px;
    transition: all 0.3s var(--ease-out-expo);
}
.list-item:hover {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(56, 189, 248, 0.2);
    transform: translateY(-2px);
}
.list-info h4 {
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.list-info p {
    color: #64748b;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 4px;
}
.list-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-top: 14px; }

.action-btn {
    padding: 10px;
    border: 1px solid;
    border-radius: 8px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s var(--ease-out-expo);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    outline: none;
}
.action-copy { background: rgba(255,255,255,0.02); border-color: rgba(255,255,255,0.1); color: #94a3b8; }
.action-copy:hover { background: #fff; color: #000; border-color: #fff; }
.action-open { background: rgba(56, 189, 248, 0.05); border-color: rgba(56, 189, 248, 0.2); color: var(--goku-gold); }
.action-open:hover { background: var(--goku-blue); color: #fff; border-color: var(--goku-blue); }
.action-detail { background: rgba(255, 255, 255, 0.02); border-color: rgba(255,255,255,0.1); color: #fff; }
.action-detail:hover { background: rgba(255,255,255,0.06); }

/* Interactive APIs Categories & Items */
.api-category {
    margin-bottom: 24px;
    background: rgba(255,255,255,0.01);
    padding: 24px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.04);
}
.api-cat-title {
    font-family: 'Orbitron', sans-serif;
    color: #fff;
    font-size: 1rem;
    margin-bottom: 18px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.api-cat-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.api-item-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.api-item-row .api-link-btn {
    flex: 1;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.82rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Share Tech Mono', monospace;
    background: rgba(0,0,0,0.2);
    padding: 12px 18px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.04);
    overflow: hidden;
    transition: all 0.3s var(--ease-out-expo);
}
.api-link-btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 80%; }
.api-item-row .api-link-btn:hover {
    color: #fff;
    border-color: rgba(56, 189, 248, 0.3);
    background: rgba(255, 255, 255, 0.01);
}
.copy-btn, .detail-btn {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.08);
    color: #fff;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s var(--ease-out-expo);
    outline: none;
}
.copy-btn:hover { background: #fff; color: #000; border-color: #fff; }
.detail-btn:hover { background: var(--goku-blue); color: #fff; border-color: var(--goku-blue); }

.special-ft-cat {
    border: 1px solid rgba(56, 189, 248, 0.4);
    background: rgba(56, 189, 248, 0.01);
}

.buy-anything-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(135deg, var(--goku-blue), #1e1b4b);
    color: #fff;
    text-decoration: none;
    padding: 20px 40px;
    border-radius: 100px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 2px;
    width: 100%;
    max-width: 320px;
    transition: transform 0.3s ease;
}
.buy-anything-btn:hover {
    transform: translateY(-2px);
}

.apk-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: rgba(255,255,255,0.01);
    padding: 16px 20px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.04);
    margin-bottom: 10px;
}
.apk-info { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.apk-info h4 { font-size: 0.95rem; color: #fff; margin: 0; word-wrap: break-word; font-weight: 500; }
.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s var(--ease-out-expo);
}
.download-btn:hover { background: #fff; color: #000; border-color: #fff; }

.source-badge {
    background: rgba(255,255,255,0.01);
    border-left: 3px solid var(--goku-blue);
    padding: 10px 16px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 16px;
    margin-top: 14px;
    border-radius: 4px;
    text-transform: uppercase;
}
.loader-text { text-align: center; color: var(--goku-gold); font-family: 'Share Tech Mono', monospace; font-size: 0.95rem; margin-top: 25px; }

/* Legals Style inside modal */
.legal-content-card {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 30px;
    color: #94a3b8;
    font-family: 'Poppins', sans-serif;
}
.legal-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.4rem;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding-bottom: 12px;
    margin-bottom: 18px;
}
.legal-text {
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 15px;
}
.legal-list {
    margin-left: 20px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.legal-list li {
    font-size: 0.88rem;
}

/* Bottom Compact Sponsored Video Ad styling */
.bottom-ad-container {
    margin: 30px auto 10px;
    max-width: 280px;
    width: 90%;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(56, 189, 248, 0.15);
    border-radius: 14px;
    padding: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.bottom-ad-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.65rem;
    letter-spacing: 2px;
    color: var(--goku-gold);
    text-transform: uppercase;
}
.bottom-ad-video {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.06);
    outline: none;
}

/* Responsive adjustments & Side-by-Side Dashboard Layout */
.profile-dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 40px;
    width: 100%;
}

@media (min-width: 992px) {
    .profile-dashboard-grid {
        grid-template-columns: 1fr 1.1fr;
        gap: 30px;
        text-align: left;
    }
    .metadata-block, .skills-block {
        margin-bottom: 0 !important;
    }
}

@media (max-width: 768px) {
    .modal-content { padding: 24px 16px; width: 95%; max-height: 90vh; }
    .modal-title { font-size: 1.5rem; }
    .modal-btn-grid { grid-template-columns: 1fr; gap: 12px; }
    
    .courses-grid, .webstore-grid { grid-template-columns: 1fr; gap: 15px; }
    
    .mod-btn { padding: 20px; flex-direction: row; justify-content: flex-start; gap: 16px; }
    .mod-btn i { font-size: 1.3rem; }
    .search-box {
        padding: 6px 0;
    }
    .search-box input { padding: 13px 16px; font-size: 0.88rem; }
    .search-box button { padding: 13px 20px; font-size: 0.95rem; }
    
    .list-actions { grid-template-columns: 1fr; gap: 6px; }
    .apk-item { flex-direction: column; align-items: flex-start; }
    .download-btn { width: 100%; }
}