/* static/css/styles.css */

/* Dark theme styles */
body {
    margin: 0;
    background: #0a0a0a;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Arial', sans-serif;
    color: #d0d0d0;
}

.logo {
    max-width: 40px;
    height: auto;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
    transition: filter 0.3s ease;
}

.logo:hover {
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.6));
}

/* Header logo */
.header-logo {
    max-width: 40px;
    height: auto;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.2));
    transition: filter 0.3s ease;
}

.header-logo:hover {
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.4));
}

/* Header */
header {
    background: #333333;
    border: 1px solid #666666;
    padding: 1.4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 100;
}

/* Header left section (logo, pricing, get started) */
.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Logo (site name) */
.site-name {
    font-size: 1rem;
    color: #b0b0b0;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.5rem;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.site-name-text {
    color: #b0b0b0;
    font-size: 1rem;
}

/* Header right section (dropdowns and delimiter) */
.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Dropdown styles */
.dropdown {
    position: relative;
    display: inline-block;
}

#account-dropdown {
    margin-right: 25px;
}

.dropdown-toggle {
    color: #d0d0d0;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.5rem;
    background: none;
    border: none;
    outline: none;
    text-decoration: none;
}

.dropdown-toggle:hover {
    color: #ffffff;
}

.get-started-btn {
    color: #ffffff;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    background: #28a745;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s ease;
}

.get-started-btn:hover {
    background: #218838;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #444444;
    border: 1px solid #666666;
    border-radius: 5px;
    min-width: 120px;
    z-index: 10;
    padding: 0.5rem 0;
}

.dropdown-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: #d0d0d0;
    text-decoration: none;
    font-size: 0.9rem;
    white-space: nowrap;
}

.dropdown-menu a:hover {
    background: #555555;
    color: #ffffff;
}

/* Show dropdown menu when active */
.dropdown.active .dropdown-menu {
    display: block;
}

/* Delimiter */
.delimiter {
    color: #666666;
    font-size: 1rem;
}

/* Main content area */
main {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    overflow: visible;
}

#wormhole {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: 1;
    top: 0;
    left: 0;
}

/* Title panel for "Wormhole Transit" and "Bending Spacetime" */
.title-panel {
    position: relative;
    margin: 2rem auto;
    background: #0d0d0d;
    padding: 1.875rem;
    border-radius: 10px;
    color: #d0d0d0;
    font-size: 1.875rem;
    border: 1px solid #1e1e1e;
    text-align: center;
    z-index: 11;
    max-width: fit-content;
}

.title-panel h1 {
    font-size: 3.75rem;
    margin: 0 0 1.25rem 0;
    color: #e0e0e0;
    display: inline;
}

.title-panel .wormhole {
    color: #b0b0b0;
}

.title-panel .transit {
    color: #e0e0e0;
}

.title-panel .blink {
    display: inline-block;
    font-size: 3.75rem;
    color: #999999;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

.title-panel p {
    font-size: 1.875rem;
    margin: 0;
    color: #b0b0b0;
}

/* Content area for buttons */
.content {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    text-align: center;
    z-index: 3;
}

/* Buttons */
.button-container {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.button {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    color: #ffffff;
    background: #444444;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.button:hover {
    background: #666666;
}

/* Effects list */
.effects {
    position: absolute;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    padding: 1rem;
    border-radius: 10px;
    color: #d0d0d0;
    font-size: 0.9rem;
    max-width: 200px;
    z-index: 2;
}

.effects h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    color: #999999;
}

.effects ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.effects li {
    margin: 0.3rem 0;
    color: #b0b0b0;
}

.effects li::before {
    content: "•";
    color: #666666;
    margin-right: 0.5rem;
}

/* Main panels */
.panels {
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 300px;
    z-index: 2;
}

.panel {
    background: rgba(0, 0, 0, 0.7);
    padding: 1rem;
    border-radius: 10px;
    color: #b0b0b0;
    font-size: 0.9rem;
    border: 1px solid #666666;
}

.panel h4 {
    margin: 0 0 0.5rem 0;
    color: #999999;
    font-size: 1.1rem;
}

/* Footer */
footer {
    background: #333333;
    padding: 2rem;
    text-align: center;
    border: 1px solid #666666;
    font-size: 0.8rem;
    color: #b0b0b0;
    position: relative;
    z-index: 100;
}

.footer-links {
    margin-bottom: 10px;
}

.footer-links a {
    color: #b0b0b0;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-links .delimiter {
    margin: 0 10px;
    color: #666666;
}

.footer-text {
    font-size: 0.8rem; /* Same size as .site-name */
    margin: 0;
}

/* Additional styles for protected and impersonate pages */
.text-center {
    text-align: center;
}

h1 {
    font-size: 2.5rem;
    color: #e0e0e0;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2rem;
    color: #e0e0e0;
    margin-bottom: 1.5rem;
}

p {
    font-size: 1.2rem;
    color: #b0b0b0;
}

/* Chatbox container (positions the chatbox near the top middle) */
.chatbox-container {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
}

/* Styles for the Web container (Ask Web section) */
.web-container {
    text-align: center;
    max-width: 1400px;
    width: 100%;
    padding: 0 1rem;
}

.web-container .web-title {
    font-size: 2rem;
    color: #999999;
    margin-bottom: 1.5rem;
}

/* Form styles */
.input-group {
    margin-bottom: 1rem;
}

.input-group input {
    width: 100%;
    padding: 0.75rem;
    font-size: 1.2rem;
    color: #d0d0d0;
    background: #333333;
    border: 1px solid #666666;
    border-radius: 5px;
    outline: none;
}

.input-group input::placeholder {
    color: #b0b0b0;
}

.input-group input:focus {
    border-color: #999999;
    background: #444444;
}

/* Output styles */
.web-output {
    height: 400px;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #666666;
    border-radius: 5px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    color: #d0d0d0;
    font-size: 1rem;
    overflow-y: auto;
    overflow-x: hidden;
    word-wrap: break-word;
    word-break: break-all;
    box-sizing: border-box;
}

/* About page styles */
.about-content {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #666666;
    border-radius: 5px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    color: #d0d0d0;
    font-size: 1rem;
    max-height: 500px;
    overflow-y: auto;
    box-sizing: border-box;
}

.about-section {
    margin-bottom: 2rem;
}

.about-section h4 {
    color: #e0e0e0;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.about-section p {
    line-height: 1.6;
    margin-bottom: 1rem;
}

.about-section ul {
    margin-left: 1.5rem;
    line-height: 1.6;
}

.about-section li {
    margin-bottom: 0.5rem;
}

/* Templates grid */
.templates-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.template-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #555;
    border-radius: 8px;
    padding: 0.75rem;
    transition: background 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.template-card:hover {
    background: rgba(255, 255, 255, 0.15);
}

.template-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.template-header h4 {
    margin: 0;
    color: #e0e0e0;
    font-size: 1rem;
}

.template-id {
    font-family: monospace;
    color: #999;
    font-size: 0.8rem;
}

.template-info {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.template-info p {
    margin: 0;
    font-size: 0.85rem;
    color: #b0b0b0;
}

.template-actions {
    display: flex;
    gap: 0.5rem;
}

.template-actions .button {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* Submenu styles */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu > a::after {
    content: " ▼";
    font-size: 0.7em;
    color: #999;
}

.dropdown-submenu.active > .submenu {
    display: block;
}

.submenu {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    background-color: #444444;
    border: 1px solid #666666;
    border-radius: 5px;
    min-width: 150px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    z-index: 11;
    padding: 0.5rem 0;
}

.submenu a {
    display: block;
    padding: 0.5rem 0.75rem;
    color: #d0d0d0;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.submenu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* Mega menu styles */
.dropdown-menu.mega-menu {
    display: none;
}

.dropdown.active .dropdown-menu.mega-menu {
    display: flex;
    gap: 2rem;
    min-width: fit-content;
    padding: 1rem;
}

/* Candidate menu - left align */
.dropdown.active .dropdown-menu.mega-menu.candidate-menu {
    justify-content: flex-start;
}

/* Employer menu - left align */
.dropdown.active .dropdown-menu.mega-menu.employer-menu {
    justify-content: flex-start;
}

.mega-menu-column {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mega-menu-header {
    font-weight: bold;
    color: #999999;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border-bottom: 1px solid #666666;
    margin-bottom: 0.5rem;
    white-space: nowrap;
}

.mega-menu-subheader {
    font-weight: bold;
    color: #ffffff;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    text-decoration: underline;
}

.mega-menu-divider {
    border: none;
    border-top: 1px solid #ffffff;
    margin: 0.5rem 1rem;
}

.web-output hr {
    border: 0;
    border-top: 1px solid #666666;
    margin: 1rem 0;
}

.user-query, .assistant-response {
    margin-bottom: 1rem;
}

.user-query strong, .assistant-response strong {
    color: #e0e0e0;
}

.message-content {
    margin-top: 0.5rem;
    white-space: pre-wrap;
    color: #b0b0b0;
}

.subject, .greeting, .paragraph {
    margin-bottom: 0.5rem;
}

.step {
    margin-bottom: 1rem;
}

.step-title {
    font-weight: bold;
    color: #e0e0e0;
}

.step-content {
    margin-top: 0.5rem;
    color: #b0b0b0;
}

.list {
    list-style: none;
    padding-left: 1rem;
    margin-bottom: 0.5rem;
}

.list li {
    margin-bottom: 0.3rem;
    position: relative;
}

.list li::before {
    content: "•";
    color: #666666;
    position: absolute;
    left: -1rem;
}

.error {
    color: #ff5555;
}

/* Icons container for impersonate-home.html */
.icons-container {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.icons-title {
    font-size: 2rem;
    color: #e0e0e0;
    margin-bottom: 2rem;
}

.icons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 2rem;
    max-width: 800px;
    width: 100%;
    justify-items: center;
}

.icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.icon-item:hover {
    transform: scale(1.1);
}

.icon-image {
    width: 64px;
    height: 64px;
    margin-bottom: 0.5rem;
}

.icon-label {
    font-size: 1rem;
    color: #d0d0d0;
    text-align: center;
}

/* Pong game styles */
.pong-container {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.pong-title {
    font-size: 2rem;
    color: #e0e0e0;
    margin-bottom: 1rem;
}

#pong-canvas {
    border: 2px solid #666666;
    background: #0a0a0a;
}

.pong-controls {
    margin-top: 1rem;
    text-align: center;
    color: #b0b0b0;
    font-size: 1rem;
}

.pong-controls p {
    margin: 0.5rem 0;
}

/* Responsive Design */
/* Hamburger — hidden on desktop */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
    position: relative;
}

.hamburger-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 10px;
    height: 10px;
    background: #dc3545;
    border-radius: 50%;
    border: 2px solid #1a1a1a;
}
.hamburger-badge.hidden { display: none; }

.hamburger span:not(.hamburger-badge) {
    display: block;
    width: 24px;
    height: 2px;
    background: #d0d0d0;
    border-radius: 2px;
    transition: all 0.3s;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.hamburger.open .hamburger-badge { display: none; }

@media (max-width: 768px) {
    /* Header becomes a single row with logo + hamburger */
    header {
        padding: 0.75rem 1rem;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        position: relative;
    }

    .hamburger {
        display: flex;
    }

    /* header-left: logo only, hide delimiter and pricing */
    .header-left .delimiter,
    .header-left .get-started-btn,
    .header-left a.dropdown-toggle {
        display: none;
    }

    /* header-right: hidden by default, slides down when open */
    .header-right {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #1a1a1a;
        border-top: 1px solid #555;
        border-bottom: 1px solid #555;
        flex-direction: column;
        padding: 1rem;
        gap: 0;
        z-index: 1000;
        max-height: 80vh;
        overflow-y: auto;
    }

    .header-right.mobile-open {
        display: flex;
    }

    /* Top-level nav links */
    .header-right > a.dropdown-toggle,
    .header-right > .delimiter {
        padding: 0.75rem 0;
        border-bottom: 1px solid #333;
        color: #d0d0d0;
        font-size: 1rem;
        width: 100%;
    }

    .header-right > .delimiter {
        display: none;
    }

    /* Dropdowns become accordion-style */
    .dropdown {
        width: 100%;
        display: block;
    }

    .dropdown-toggle {
        width: 100%;
        text-align: left;
        padding: 0.75rem 0;
        border-bottom: 1px solid #333;
        font-size: 1rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .dropdown-toggle::after {
        content: '▾';
        font-size: 0.8rem;
        color: #888;
    }

    /* Mega menu: full width, stacked columns */
    .dropdown-menu {
        position: static;
        display: none;
        flex-direction: column;
        width: 100%;
        min-width: unset;
        padding: 0;
        gap: 0;
        background: #111;
        border: none;
        box-shadow: none;
    }

    .dropdown.active .dropdown-menu,
    .dropdown.active .dropdown-menu.mega-menu {
        display: flex;
    }

    .mega-menu-column {
        padding: 0.5rem 1rem;
        border-bottom: 1px solid #2a2a2a;
    }

    .mega-menu-header {
        font-size: 0.9rem;
        padding: 0.5rem 0;
        border-bottom: 1px solid #333;
    }

    .mega-menu-subheader {
        padding: 0.4rem 0;
        font-size: 0.8rem;
    }

    .dropdown-menu a {
        padding: 0.5rem 0;
        display: block;
        color: #c0c0c0;
        font-size: 0.9rem;
    }

    /* Account dropdown */
    #account-dropdown {
        margin-right: 0;
    }

    .site-name {
        padding: 0.3rem;
        font-size: 0.9rem;
    }
    
    .header-logo {
        max-width: 30px;
    }
    
    /* Title panel adjustments */
    .title-panel {
        top: 30%;
        padding: 1rem;
        margin: 1rem auto;
        width: calc(100% - 2rem);
        box-sizing: border-box;
        text-align: center;
    }
    
    .title-panel h1 {
        font-size: 2rem;
    }
    
    .title-panel .blink {
        font-size: 2rem;
    }
    
    .title-panel p {
        font-size: 1.2rem;
    }
    
    .content {
        top: 50%;
        width: 100%;
        padding: 0 1rem;
        box-sizing: border-box;
    }
    
    .button-container {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .button {
        width: 200px;
        padding: 0.5rem 1rem;
    }
    
    .effects, .panels {
        display: none;
    }
    
    footer {
        padding: 1rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .footer-links .delimiter {
        display: none;
    }
    
    .web-container {
        padding: 0 0.5rem;
    }
    
    .input-group input {
        font-size: 1rem;
        padding: 0.5rem;
    }
    
    .web-output {
        padding: 1rem;
        font-size: 0.9rem;
    }
    
    .icons-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 1rem;
        padding: 0 1rem;
    }
    
    .icon-image {
        width: 48px;
        height: 48px;
    }
    
    .icon-label {
        font-size: 0.9rem;
    }
    
    #pong-canvas {
        max-width: 100%;
        height: auto;
    }
}

@media (max-width: 480px) {
    .title-panel h1 {
        font-size: 1.5rem;
    }
    
    .title-panel .blink {
        font-size: 1.5rem;
    }
    
    .title-panel p {
        font-size: 1rem;
    }
    
    .site-name {
        font-size: 0.8rem;
    }
    
    .header-logo {
        max-width: 25px;
    }
    
    .dropdown-toggle {
        font-size: 0.8rem;
        padding: 0.3rem;
    }
}

.pong-controls {
    margin-top: 1rem;
    text-align: center;
    color: #b0b0b0;
    font-size: 1rem;
}

.pong-controls p {
    margin: 0.5rem 0;
}

/* Preview button */
.preview-button {
    margin-top: 1rem;
}

/* Loading circle */
.loading-circle {
    width: 20px;
    height: 20px;
    border: 2px solid #333;
    border-top: 2px solid #999;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 10px auto;
    display: block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Admin menu visibility classes */
.admin-menu-hidden {
    display: none;
}

.admin-menu-visible {
    display: block;
}

.section-title-card {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #666666;
    border-radius: 10px;
    padding: 1.5rem;
    margin: 0 auto 2rem auto;
    max-width: fit-content;
}

.section-title-card h2 {
    margin: 0;
    color: white;
    font-size: 1.25rem;
}

.section-conclusion-card {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #666666;
    border-radius: 10px;
    padding: 1.5rem;
    margin: 2rem auto 0 auto;
    max-width: fit-content;
}

.section-conclusion-card p {
    margin: 0;
    color: white;
    font-size: 1.5rem;
}

/* Global link styling - white and bold for all text links (excluding header, footer, and dropdowns) */
main a:not(.dropdown-toggle):not(.get-started-btn):not(.site-name) {
    color: #ffffff;
    font-weight: bold;
    text-decoration: none;
}

main a:not(.dropdown-toggle):not(.get-started-btn):not(.site-name):visited {
    color: #ffffff;
}

main a:not(.dropdown-toggle):not(.get-started-btn):not(.site-name):hover {
    color: #ffffff;
    text-decoration: underline;
}