/* Neo-Tokyo Void Ninja Styles */
:root {
    --primary-color: #ff00a0;
    --secondary-color: #0df2ff;
    --accent-color: #9600ff;
    --text-color: #e0e0e0;
    --dark-bg: #0a0a12;
    --card-bg: #151525;
    --card-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
    --hover-shadow: 0 0 28px rgba(255, 0, 160, 0.4);
    --card-radius: 0px;
    --transition-speed: 0.3s;
    --border-color: #ff00a070;
    --grid-color: rgba(13, 242, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--dark-bg); /* Base dark background */
    color: var(--text-color);
    padding: 2rem; /* Spacing from viewport edges */
    position: relative; /* Needed for the ::before pseudo-element */
    overflow-x: hidden; /* Prevent horizontal scrollbars if ::before shifts slightly */
    min-height: 100vh; /* Ensure body takes at least viewport height */
}

body::before { /* Animated starfield back on the body */
    content: "";
    position: fixed; /* Fixed positioning to cover viewport */
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%230df2ff' fill-opacity='0.03' fill-rule='evenodd'/%3E%3C/svg%3E");
    z-index: -1; /* Place it behind all other content */
    animation: subtle-move 120s linear infinite;
}

@keyframes subtle-move {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

main.container { /* Container for the actual content */
    width: 100%;
    max-width: 1200px;
    margin: 0 auto; /* Center the container */
    position: relative; /* To establish stacking context if needed */
    z-index: 1; /* Ensure container is above the body::before */
    /* Grid/gradient background specific to the content container */
    background-color: var(--dark-bg); 
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(150, 0, 255, 0.15) 0%, transparent 80%),
        linear-gradient(rgba(10, 10, 18, 0.97) 3px, transparent 3px),
        linear-gradient(90deg, rgba(10, 10, 18, 0.97) 3px, transparent 3px);
    background-size: 100% 100%, 40px 40px, 40px 40px;
    border-radius: 4px;
    /* Removed overflow: hidden to allow potential shadows */
}

.nav-container { /* This holds the cards and modals, applies blur */
    background-color: rgba(10, 10, 18, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 4px; /* Match container rounding */
    padding: 3rem;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    position: relative;
    overflow: hidden; /* Clip internal effects like gradients */
}

.nav-container::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--secondary-color), transparent);
}

h1 {
    text-align: center;
    margin-bottom: 2.5rem;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 2.5rem;
    letter-spacing: 8px;
    text-shadow: 0 0 10px rgba(255, 0, 160, 0.5);
    position: relative;
}

.nav-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text-color);
    box-shadow: var(--card-shadow);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed), border-color var(--transition-speed);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.card::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    transform: scaleX(0);
    background: linear-gradient(90deg, transparent, var(--secondary-color), transparent);
    transition: transform 0.4s ease-out;
    transform-origin: center;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 15px var(--accent-color);
    border-color: var(--secondary-color);
}

.card:hover::after {
    transform: scaleX(1);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1.2rem;
    filter: drop-shadow(0 0 8px var(--accent-color));
}

.card h2 {
    font-family: 'Orbitron', sans-serif;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.card p {
    color: rgba(224, 224, 224, 0.7);
    font-size: 0.9rem;
    font-weight: 300;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .nav-container {
        padding: 2rem 1.5rem;
    }
    
    h1 {
        font-size: 1.8rem;
        letter-spacing: 4px;
        margin-bottom: 2rem;
    }
    
    .nav-cards {
        grid-template-columns: 1fr;
    }
}

/* Animation effects */
.card {
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(13, 242, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.card:hover::before {
    transform: translateX(100%);
}

/* AI Guide Button */
.guide-button {
    display: block;
    position: relative;
    margin: 0 auto 2rem;
    padding: 0.8rem 1.5rem;
    background-color: var(--dark-bg);
    color: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 2px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    letter-spacing: 1px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(150, 0, 255, 0.2);
    z-index: 1;
}

.guide-button:hover {
    color: #fff;
    border-color: var(--secondary-color);
    box-shadow: 0 0 20px rgba(13, 242, 255, 0.4);
}

.guide-button .glow-effect {
    position: absolute;
    width: 30px;
    height: 100%;
    top: 0;
    left: -100px;
    background: linear-gradient(90deg, transparent, rgba(13, 242, 255, 0.3), transparent);
    animation: button-glow 3s infinite;
    z-index: -1;
}

@keyframes button-glow {
    0% { left: -100px; }
    100% { left: 100%; }
}

/* Modal Popup */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.modal.show {
    opacity: 1;
}

.modal-content {
    background-color: var(--dark-bg);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 2rem;
    box-shadow: 0 0 30px rgba(150, 0, 255, 0.3);
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.modal.show .modal-content {
    transform: translateY(0);
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    color: var(--secondary-color);
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-btn:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
}

.modal-title {
    font-family: 'Orbitron', sans-serif;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
    font-size: 1.8rem;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(255, 0, 160, 0.3);
}

.modal-intro {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.5;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.guide-section {
    margin-bottom: 2.5rem;
    border-bottom: 1px solid rgba(13, 242, 255, 0.2);
    padding-bottom: 2rem;
}

.guide-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.guide-section h3 {
    font-family: 'Orbitron', sans-serif;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    letter-spacing: 1px;
}

.task-group {
    margin-bottom: 1.5rem;
}

.task-group h4 {
    color: var(--text-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    border-left: 3px solid var(--accent-color);
    padding-left: 10px;
}

.model-card {
    background-color: rgba(21, 21, 37, 0.7);
    border: 1px solid rgba(255, 0, 160, 0.3);
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.model-card:hover {
    box-shadow: 0 0 15px rgba(13, 242, 255, 0.2);
    border-color: var(--secondary-color);
}

.model-card.primary {
    border-left: 3px solid var(--secondary-color);
}

.model-card.alt {
    border-left: 3px solid var(--accent-color);
    margin-left: 1rem;
}

.model-name {
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.model-desc {
    color: rgba(224, 224, 224, 0.8);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.model-link {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.85rem;
    border-bottom: 1px dashed rgba(255, 0, 160, 0.5);
    transition: all 0.3s ease;
}

.model-link:hover {
    color: var(--accent-color);
    border-bottom: 1px solid var(--accent-color);
}

.access-group {
    margin-bottom: 1.5rem;
}

.access-group h4 {
    color: var(--text-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    border-left: 3px solid var(--accent-color);
    padding-left: 10px;
}

.model-list {
    list-style: none;
    padding-left: 1rem;
}

.model-list li {
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 1rem;
    line-height: 1.4;
}

.model-list li::before {
    content: "►";
    color: var(--primary-color);
    position: absolute;
    left: -0.5rem;
    font-size: 0.8rem;
}

.paid-model {
    margin-bottom: 1.5rem;
}

.paid-model h5 {
    color: var(--secondary-color);
    margin-bottom: 0.6rem;
    font-size: 1rem;
}

.access-list {
    list-style: none;
    padding-left: 0.5rem;
}

.access-list li {
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 1.5rem;
    line-height: 1.4;
}

.access-list li::before {
    content: "•";
    color: var(--secondary-color);
    position: absolute;
    left: 0.2rem;
    font-size: 1.2rem;
}

.access-list a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px dashed rgba(255, 0, 160, 0.5);
    transition: all 0.3s ease;
}

.access-list a:hover {
    color: var(--accent-color);
    border-bottom: 1px solid var(--accent-color);
}

.table-wrapper {
    overflow-x: auto;
    margin-bottom: 1rem;
}

.reference-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    background-color: rgba(10, 10, 18, 0.5);
    border: 1px solid var(--border-color);
}

.reference-table th, 
.reference-table td {
    padding: 0.8rem;
    text-align: left;
    border-bottom: 1px solid rgba(13, 242, 255, 0.2);
}

.reference-table th {
    background-color: rgba(150, 0, 255, 0.2);
    color: var(--secondary-color);
    font-family: 'Orbitron', sans-serif;
    font-weight: 400;
    letter-spacing: 1px;
}

.reference-table tr:hover td {
    background-color: rgba(255, 0, 160, 0.1);
}

.tips-list {
    list-style: none;
    padding-left: 0.5rem;
}

.tips-list li {
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 1.8rem;
    line-height: 1.4;
}

.tips-list li::before {
    content: "✓";
    color: var(--secondary-color);
    position: absolute;
    left: 0.2rem;
    font-size: 1rem;
}

.guide-conclusion {
    text-align: center;
    margin-top: 1.5rem;
    font-style: italic;
    color: var(--text-color);
}

/* Styles for Simplified List */
.simplified-list {
    border-bottom: none; /* Remove border if it's the only section */
}

.simplified-model-item {
    margin-bottom: 1.5rem;
}

.simplified-model-item:last-child {
    margin-bottom: 0;
}

.model-link-box {
    display: block;
    background-color: rgba(21, 21, 37, 0.7);
    border: 1px solid rgba(255, 0, 160, 0.3);
    border-radius: 4px;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    border-left: 3px solid var(--secondary-color);
}

.model-link-box:hover {
    box-shadow: 0 0 15px rgba(13, 242, 255, 0.2);
    border-color: var(--secondary-color);
    transform: translateX(5px);
}

.model-link-box .model-name {
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.model-link-box .model-desc {
    color: rgba(224, 224, 224, 0.8);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Responsive adjustments for modal */
@media (max-width: 768px) {
    .modal-content {
        padding: 1.5rem;
        width: 95%;
        max-height: 85vh;
    }
    
    .modal-title {
        font-size: 1.4rem;
        letter-spacing: 1px;
    }
    
    .guide-section h3 {
        font-size: 1.2rem;
    }
    
    .model-card.alt {
        margin-left: 0.5rem;
    }
    
    .close-btn {
        top: 0.8rem;
        right: 1rem;
    }
}

/* Additional mobile optimizations */
@media (max-width: 480px) {
    .modal-content {
        padding: 1rem;
        width: 100%;
        border-radius: 0;
        max-height: 100vh;
    }
    
    .modal-title {
        font-size: 1.2rem;
        letter-spacing: 0;
        margin-bottom: 0.8rem;
    }
    
    .simplified-model-item {
        margin-bottom: 1rem;
    }
    
    .model-link-box {
        padding: 0.8rem;
        border-radius: 3px;
    }
    
    .model-link-box .model-name {
        font-size: 1rem;
        margin-bottom: 0.3rem;
    }
    
    .model-link-box .model-desc {
        font-size: 0.85rem;
        line-height: 1.3;
    }
    
    /* Remove hover animations on touch devices to prevent layout shifting */
    .model-link-box:hover {
        transform: none;
        box-shadow: 0 0 10px rgba(13, 242, 255, 0.1);
    }
    
    /* Ensure modal displays properly in fixed position */
    .modal {
        align-items: flex-start;
    }
    
    .modal.show .modal-content {
        transform: translateY(0);
    }
    
    .close-btn {
        font-size: 1.5rem;
        top: 0.5rem;
        right: 0.8rem;
        padding: 0.3rem;
    }
}

/* Button for Tool Request - can be same as guide-button or slightly different */


/* If you want a secondary style for buttons */
.secondary-guide-button {
    background-color: #555; /* Example secondary color */
    border: 1px solid #777;
}
.secondary-guide-button:hover {
    background-color: #666;
}



/* Form elements within the modal */
.tool-request-modal-content form {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Spacing between form groups */
}

.tool-request-modal-content form div {
    display: flex;
    flex-direction: column;
}

.tool-request-modal-content label {
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #eee; /* Light text for dark modal */
}

.tool-request-modal-content input[type="text"],
.tool-request-modal-content input[type="email"],
.tool-request-modal-content select,
.tool-request-modal-content textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #555; /* Darker border for dark modal */
    border-radius: 5px;
    font-size: 1rem;
    background-color: #333; /* Dark input background */
    color: #fff; /* Light input text */
    box-sizing: border-box;
}

.tool-request-modal-content textarea {
    min-height: 100px;
    resize: vertical;
}

.tool-request-modal-content select {
    appearance: none; /* For custom arrow if desired, or leave for default */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3E%3Cpath d='M8 11.207L2.396 5.604l.707-.707L8 9.793l4.896-4.896.707.707z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
}


.tool-request-modal-content .submit-btn {
    background-color: var(--primary-color, #3498db); /* Use your primary color variable */
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

.tool-request-modal-content .submit-btn:hover {
    background-color: var(--secondary-color, #2980b9); /* Use your secondary color variable */
}

/* Form message styling within modal */
.form-message {
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 5px;
    font-weight: 500;
    font-size: 0.95rem;
    display: none; /* Hidden by default, shown by JS */
}

.form-message.success {
    background-color: #27ae60; /* Darker green for dark modal */
    color: #fff;
    border: 1px solid #2ecc71;
    display: block;
}

.form-message.error {
    background-color: #c0392b; /* Darker red for dark modal */
    color: #fff;
    border: 1px solid #e74c3c;
    display: block;
}

/* Ensure modal content has some padding */
.modal-content {
    padding: 20px 30px; /* Or adjust as per your existing modal */
}

/* Responsiveness for the form elements inside the modal */
@media (max-width: 600px) {

    .modal-content {
         padding: 20px 20px;
    }
} 