/* Document Layout Layer for Guides Page */
.docs-navbar {
    position: sticky !important;
    top: 0;
    z-index: 1000;
}

.pt-nav {
    margin-top: 100px;
    padding-bottom: 100px;
    position: relative;
    z-index: 1;
}

.guides-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 3rem;
    align-items: start;
    position: relative;
}

/* Base styles for the sidebar to remain completely glued to the top of the DOCUMENT (not viewport) */
.guides-sidebar {
    position: static;
    margin-top: 0;
    z-index: 20;
    /* Elevates tooltips */
}

/* macOS Dock Styles */
.mac-dock.vertical {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(20, 20, 25, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 40px;
    padding: 1.5rem 0.6rem;
    gap: 1.2rem;
    /* Provides extra breathing room for magnification */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transform-origin: left center;
}

.dock-item {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
    cursor: pointer;
    /* Default variable for JS-driven magnification */
    --scale: 1;
    transform: scale(var(--scale));
}

.dock-item.active {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.dock-item:hover {
    color: white;
}

/* Tooltip for Dock Items */
.dock-item::before {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 15px);
    top: 50%;
    transform: translateY(-50%) scale(0.8);
    background: rgba(10, 10, 12, 0.9);
    border: 1px solid var(--glass-border);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: white;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.2s ease;
    z-index: 100;
}

.dock-item:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) scale(1);
}

.docs-content {
    background: rgba(20, 20, 25, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 3rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* Tab System Dynamics */
.docs-viewport {
    position: relative;
    overflow: hidden;
}

.tab-pane {
    display: none;
    width: 100%;
}

.tab-pane.active {
    display: block;
}

/* Mathematical Expansion Keyframes */
.slide-out-left {
    animation: slideOutLeft 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

@keyframes slideOutLeft {
    0% {
        transform: translateX(0);
        opacity: 1;
    }

    100% {
        transform: translateX(-150%);
        opacity: 0;
        display: none;
    }
}

.droplet-expand {
    animation: dropletReveal 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes dropletReveal {
    0% {
        clip-path: circle(0px at var(--ox, 50%) var(--oy, 50%));
        opacity: 0;
        transform: scale(0.98);
    }

    10% {
        opacity: 1;
    }

    100% {
        clip-path: circle(150% at var(--ox, 50%) var(--oy, 50%));
        opacity: 1;
        transform: scale(1);
    }
}

/* Placeholder Fancy Video Player */
.fancy-video-player {
    position: relative;
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, rgba(30, 30, 35, 0.8), rgba(15, 15, 20, 0.9));
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    margin: 1.5rem 0 2.5rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.fancy-video-player:hover {
    box-shadow: 0 10px 40px rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.4);
}

.play-btn-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.5);
    transition: transform 0.3s ease;
}

.fancy-video-player:hover .play-btn-circle {
    transform: scale(1.1);
}

.vid-duration {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: white;
    font-family: monospace;
}

.docs-header {
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 2rem;
    margin-bottom: 2rem;
}

.docs-header h1 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 700;
}

.docs-icon {
    color: var(--primary-color);
}

.docs-meta {
    display: flex;
    gap: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    align-items: center;
}

.docs-meta span.icon-text {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.badge-tag {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
}

.badge-tag.success {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.docs-body h2 {
    font-size: 1.6rem;
    margin-top: 2.5rem;
    margin-bottom: 1.2rem;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.5rem;
    font-weight: 600;
}

.docs-body p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.text-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.text-link:hover {
    color: #60a5fa;
    text-decoration: underline;
}

/* Configuration Features Styling */
.features-sections {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin-top: 2rem;
}

.category-block h3 {
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    opacity: 0.9;
}

.category-block h3 i {
    color: var(--primary-color);
}

.feature-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.feature-tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.feature-tag:hover {
    color: white;
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.5);
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 5px 20px rgba(139, 92, 246, 0.3);
}

/* Feature Info Modal (Shibal Engine Style) */
.feature-info-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    /* Hidden by default */
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

.feature-info-modal.active {
    display: flex;
}

.feature-info-modal .modal-content {
    width: 95%;
    max-width: 950px;
    border-radius: 24px;
    border: 2px solid var(--glass-border);
    overflow: hidden;
    background: linear-gradient(90deg,
            rgba(10, 10, 12, 0.95),
            rgba(20, 15, 30, 0.95),
            rgba(10, 10, 12, 0.95));
    background-size: 200% 100%;
    animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        gradient-flow 8s linear infinite;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

#feature-modal .panel-header {
    background: linear-gradient(90deg,
            rgba(139, 92, 246, 0.1),
            rgba(59, 130, 246, 0.15),
            rgba(139, 92, 246, 0.1));
    background-size: 200% 100%;
    animation: gradient-flow 4s linear infinite;
    border-bottom: 1px solid var(--glass-border);
}

#modal-title {
    font-size: 1.4rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

@keyframes gradient-flow {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 200% 50%;
    }
}

.control-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #333;
    display: inline-block;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.control-dot.red {
    background: #ff5f56;
    width: 22px;
    height: 22px;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(255, 95, 86, 0.5);
}

.modal-text {
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    padding: 1.5rem 1rem;
    font-size: 1.35rem;
}

#modal-title {
    font-size: 1.4rem;
    font-weight: 700;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.warning-box {
    background: rgba(234, 179, 8, 0.1);
    border-left: 4px solid #eab308;
    padding: 1.5rem;
    border-radius: 4px 8px 8px 4px;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-top: 2rem;
    color: rgba(255, 255, 255, 0.8);
}

.warning-box i {
    color: #eab308;
    font-size: 1.5rem;
}

/* Troubleshooting Styling */
.trouble-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.trouble-card {
    padding: 2rem;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    border-radius: 12px;
}

.trouble-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    transition: transform 0.3s ease;
}

.trouble-card h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin: 0;
}

.trouble-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

.trouble-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.15);
    background: rgba(255, 255, 255, 0.05);
}

.trouble-card:hover i {
    transform: scale(1.1);
    color: #a78bfc;
}

.back-to-list {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-to-list:hover {
    color: var(--text-primary);
    border-color: var(--primary-color);
    background: rgba(139, 92, 246, 0.1);
}

#trouble-detail-view {
    animation: fadeIn 0.4s ease;
}

#trouble-title {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

#trouble-desc {
    font-size: 1.1rem;
    line-height: 1.8;
}


@media (max-width: 1200px) {
    /* No adjustments needed because the grid automatically handles width */
}

@media (max-width: 768px) {
    .guides-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem 80px;
        /* Add bottom padding for the fixed dock */
    }

    .guides-sidebar {
        margin-bottom: 1rem;
    }

    .mac-dock.vertical {
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        flex-direction: row;
        width: auto;
        min-width: 280px;
        height: 60px;
        background: rgba(15, 15, 15, 0.85);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 30px;
        padding: 0 1.5rem;
        justify-content: center;
        z-index: 1000;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    }

    .dock-item i {
        font-size: 1.4rem;
    }

    .dock-item::before {
        display: none;
    }

    .docs-content {
        padding: 1.5rem 1rem;
    }

    .docs-header h1 {
        font-size: 1.6rem;
    }

    .docs-meta {
        font-size: 0.8rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    /* Modal Scaling for Mobile */
    .feature-info-modal .modal-content {
        width: 95%;
        padding: 1.5rem 1rem;
        margin: 0 0.5rem;
    }

    #modal-title {
        font-size: 1.2rem;
    }

    .modal-text {
        font-size: 1.1rem;
        padding: 1rem 0;
    }
}