/* ==========================================
   RandyAI Modular Hub Framework
   ========================================== */

.modular-hub {
    margin-top: 4rem;
    background: var(--hub-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--hub-border);
    border-radius: 40px;
    padding: 3rem;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.4);
    min-height: 200px;
    position: relative;
    z-index: 10;
}

.hub-nav {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

.hub-tab {
    padding: 1.25rem 2.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.hub-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.2);
}

.hub-tab.active {
    background: var(--hub-active-accent);
    color: white;
    box-shadow: 0 15px 35px rgba(245, 158, 66, 0.4);
    border-color: transparent;
}

.module-pane {
    display: none;
    animation: hubFadeIn 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.module-pane.active {
    display: block;
}

@keyframes hubFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ==========================================
   Home Hub Grid (Command Center)
   ========================================== */
.command-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 4rem;
}

.command-card {
    background: var(--v2-card-bg, rgba(17, 24, 39, 0.6));
    border: 1px solid var(--v2-border-color, rgba(255, 255, 255, 0.1));
    backdrop-filter: var(--v2-blur, blur(20px));
    -webkit-backdrop-filter: var(--v2-blur, blur(20px));
    border-radius: 32px;
    padding: 2.5rem 2rem;
    transition: var(--v2-transition, all 0.4s ease);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 520px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    text-decoration: none;
    height: 100%;
}

.command-card:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-15px);
    border-color: var(--primary-orange);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
}

.command-card h3 {
    font-size: 2.25rem;
    margin-bottom: 1.25rem;
    color: var(--v2-white, #ffffff);
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.command-card p {
    color: var(--v2-muted, rgba(255, 255, 255, 0.7));
    font-size: 1.15rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

.command-icon {
    font-size: 4rem;
    margin-bottom: 2rem;
}

.card-visual {
    position: absolute;
    bottom: -30px;
    right: -30px;
    opacity: 0.05;
    font-size: 12rem;
    transform: rotate(-15deg);
    transition: var(--transition);
    pointer-events: none;
}

.command-card .btn {
    margin-top: auto;
    width: 100%;
}


.command-card:hover .card-visual {
    opacity: 0.15;
    transform: rotate(10deg) scale(1.3);
    color: var(--primary-orange);
}

/* Specific Card Accents */
.card-study:hover {
    border-color: #60a5fa;
}

.card-coin:hover {
    border-color: #fbbf24;
}

.card-water:hover {
    border-color: #34d399;
}

.card-help:hover {
    border-color: #f87171;
}

@media (max-width: 1100px) {
    .command-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .modular-hub {
        padding: 1.5rem;
        border-radius: 24px;
    }

    .hub-tab {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }

    .command-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .command-card {
        padding: 2.5rem;
        min-height: auto;
    }
}