/* Override the body styles from main CSS for tutorials page */
html, body {
    font-family: pixellari !important;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 100vh !important;
    background-image: url('parking_lot_animated.gif') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important; /* This keeps background fixed while scrolling */
    color: aliceblue !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    /* Override any flexbox centering from main CSS */
    display: flex !important;
    justify-content: center !important;
    align-items: initial !important;
    height: auto !important;
}

.tutorial-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 60px 20px 20px 20px; /* Increased top padding even more */
    text-align: center;
    min-height: 100vh;
    box-sizing: border-box;
}

.tutorial-header {
    margin-bottom: 40px;
    background-color: rgba(0, 0, 0, 0.4);
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(250, 169, 102, 0.2);
    margin-top: 40px; /* Increased top margin */
}

.guide-subtitle {
    font-size: 18px;
    color: aliceblue;
    text-shadow: 1px 1px #403460;
    margin: 10px 0 20px 0;
}

.back-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: rgba(64, 52, 96, 0.8);
    color: #FAA966;
    text-decoration: none;
    border-radius: 10px;
    font-family: pixellari;
    font-size: 14px;
    transition: all 0.3s ease;
    text-shadow: 1px 1px #403460;
    border: 1px solid rgba(250, 169, 102, 0.3);
}

.back-button:hover {
    background-color: rgba(64, 52, 96, 1);
    transform: translateY(-2px);
    border-color: #FAA966;
}

.tutorial-categories {
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding-bottom: 60px; /* Add space at bottom for footer */
    margin-top: 40px; /* Increased top margin */
}

.category {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 30px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(250, 169, 102, 0.1);
}

.category h2 {
    color: #FAA966;
    font-size: 24px;
    margin-bottom: 20px;
    text-shadow: 2px 2px #6d55b0;
}

.tutorial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    justify-items: center;
}

.tutorial-item {
    background-color: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(250, 169, 102, 0.2);
    border-radius: 15px;
    padding: 20px;
    width: 100%;
    max-width: 250px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: pixellari;
    color: aliceblue;
    text-align: left;
}

.tutorial-item:hover {
    background-color: rgba(64, 52, 96, 0.6);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    border-color: #FAA966;
}

.tutorial-name {
    display: block;
    font-size: 16px;
    font-weight: bold;
    color: #FAA966;
    margin-bottom: 5px;
    text-shadow: 1px 1px #403460;
}

.tutorial-desc {
    font-size: 12px;
    color: aliceblue;
    text-shadow: 1px 1px #403460;
}

/* Multi-path tutorial styles */
.tutorial-item.multi-path {
    cursor: default;
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(250, 169, 102, 0.4);
    max-width: 400px;
    min-width: 300px;
}

.tutorial-item.multi-path:hover {
    transform: none;
    background-color: rgba(0, 0, 0, 0.5);
    border-color: rgba(250, 169, 102, 0.6);
}

.path-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.path-button {
    background-color: rgba(64, 52, 96, 0.6);
    border: 1px solid rgba(250, 169, 102, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: pixellari;
    color: aliceblue;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
}

.path-button:hover {
    background-color: rgba(64, 52, 96, 0.8);
    border-color: #FAA966;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.path-name {
    display: block;
    font-size: 13px;
    font-weight: bold;
    color: #FAA966;
    margin-bottom: 2px;
    text-shadow: 1px 1px #403460;
}

.path-desc {
    font-size: 11px;
    color: aliceblue;
    text-shadow: 1px 1px #403460;
    opacity: 0.9;
}

/* Tutorial Modal */
.tutorial-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    overflow-y: auto;
}

.tutorial-content {
    background-color: rgba(20, 20, 40, 0.95);
    margin: 5% auto;
    padding: 0;
    width: 90%;
    max-width: 800px;
    border-radius: 20px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(250, 169, 102, 0.3);
}

.tutorial-header-modal {
    background-color: rgba(64, 52, 96, 0.8);
    padding: 20px;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tutorial-header-modal h2 {
    margin: 0;
    color: #FAA966;
    font-size: 24px;
    text-shadow: 2px 2px #6d55b0;
}

.close-tutorial {
    background: none;
    border: none;
    color: aliceblue;
    font-size: 24px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.close-tutorial:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.tutorial-text {
    padding: 20px 30px;
    color: aliceblue;
    line-height: 1.6;
    overflow-y: auto;
    flex-grow: 1;
    font-size: 14px;
}

.tutorial-text h1 {
    color: #FAA966;
    text-shadow: 2px 2px #6d55b0;
    border-bottom: 2px solid #FAA966;
    padding-bottom: 10px;
}

.tutorial-text h2 {
    color: #FAA966;
    text-shadow: 1px 1px #6d55b0;
    margin-top: 25px;
}

.tutorial-text ol, .tutorial-text ul {
    margin-left: 20px;
}

.tutorial-text code {
    background-color: rgba(64, 52, 96, 0.5);
    padding: 2px 6px;
    border-radius: 4px;
    color: #FAA966;
}

.back-button-modal {
    margin: 20px;
    padding: 12px 24px;
    background-color: rgba(64, 52, 96, 0.8);
    color: #FAA966;
    border: 1px solid rgba(250, 169, 102, 0.3);
    border-radius: 10px;
    font-family: pixellari;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 1px 1px #403460;
}

.back-button-modal:hover {
    background-color: rgba(64, 52, 96, 1);
    transform: translateY(-2px);
    border-color: #FAA966;
}

/* Footer Updates */
.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.footer-separator {
    color: aliceblue;
    opacity: 0.6;
}

.guide-link {
    color: #FAA966;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.guide-link:hover {
    color: #fff;
    border-bottom: 1px solid #FAA966;
    text-shadow: 1px 1px #6d55b0;
}

/* Mobile Responsiveness */
@media only screen and (max-width: 600px) {
    html, body {
        background-image: url('title_screen_mobile.gif') !important;
    }
    
    .tutorial-container {
        padding: 40px 15px 15px 15px; /* Increased top padding for mobile too */
    }
    
    .tutorial-header {
        margin-bottom: 20px;
        margin-top: 20px; /* Increased top margin for mobile */
        padding: 15px;
    }
    
    .tutorial-categories {
        gap: 25px;
        padding-bottom: 80px;
        margin-top: 20px; /* Increased top margin for mobile */
    }
    
    .category {
        padding: 20px;
    }
    
    .tutorial-grid {
        grid-template-columns: 1fr;
    }
    
    .tutorial-content {
        width: 95%;
        margin: 2% auto;
        max-height: 95vh;
    }
    
    .tutorial-text {
        padding: 15px 20px;
        font-size: 13px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 5px;
    }
    
    .footer-separator {
        display: none;
    }
    
    .tutorial-item.multi-path {
        min-width: auto;
        max-width: 100%;
    }
    
    .path-buttons {
        gap: 6px;
    }
    
    .path-button {
        padding: 6px 10px;
    }
    
    .path-name {
        font-size: 12px;
    }
    
    .path-desc {
        font-size: 10px;
    }
}