main {
    padding-top: 140px;
    padding-bottom: 40px;
}

.notebook-container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 20px;
    background: rgba(15, 20, 35, 0.9);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Back to standard, normal layout */
.notebook-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #00d2ff;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.notebook-header h2 .icon,
.notebook-header h2 .file-text {
    font-size: 1rem;
}

.notebook-header h2 {
    color: #00d2ff;
    margin: 0;
}

.back-btn {
    color: #d884ff;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    padding: 8px 15px;
    background: #2a1b3d;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.back-btn:hover {
    background: #3f2a5c;
}

.iframe-wrapper {
    position: relative;
    width: 100%;
    background: #0a0e17;
    border-radius: 8px;
    overflow-x: hidden;
    overflow-y: hidden;
}

#notebook-iframe {
    width: 100%;
    border: none;
    background: #ffffff;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.loader-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    /* Solid background color blocks everything behind it */
    background: #0a0e17;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #00d2ff;
    z-index: 10;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(0, 210, 255, 0.2);
    border-top-color: #00d2ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* =========================================
   Mobile View (Screens smaller than 768px)
   ========================================= */
@media (max-width: 768px) {
    main {
        padding-top: 200px;
    }

    .notebook-container {
        margin: 15px 10px;
        padding: 15px;
    }

    .notebook-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        /* Removed text-align: center so it naturally aligns left */
    }

    /* Make the title act exactly like your directory lists */
    .notebook-header h2 {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        /* Space between icon and text */
        margin: 0;
    }

    /* Stop the icon from shrinking */
    .notebook-header h2 .icon {
        flex-shrink: 0;
        margin-top: 2px;
        /* Tiny nudge to align perfectly with the text */
    }

    /* Force the text to wrap in a clean column */
    .notebook-header h2 .file-text {
        overflow-wrap: anywhere;
        word-break: break-word;
        line-height: 1.4;
    }

    /* Add this inside your @media block */

    .notebook-header h2 .icon,
    .notebook-header h2 .file-text {
        font-size: 1rem;
        /* Apply directly to the spans */
    }

    .back-btn {
        display: block;
        text-align: center;
        font-size: 1rem;
    }
}