:root {
    /* Glean.com colors */
    --primary-color: #d8fd49; /* Lime Green - Glean's primary accent */
    --secondary-color: #070d1a; /* Dark blue-black */
    --accent-color: #2664ec; /* Blue */
    --success-color: #0ebe86; /* Emerald */
    --warning-color: #f59e0b; /* Amber */
    --danger-color: #ef4444; /* Red */
    --text-color: #070d1a; /* Dark blue-black */
    --text-light: #4b5563; /* Gray 600 */
    --text-lighter: #9ca3af; /* Gray 400 */
    --bg-color: #ffffff; /* White */
    --bg-light: #f9fafb; /* Gray 50 */
    --bg-dark: #070d1a; /* Dark blue-black */
    --border-color: #e5e7eb; /* Gray 200 */
    --shadow: rgba(0, 0, 0, 0.05) 0px 1px 3px 0px, rgba(0, 0, 0, 0.1) 0px 1px 2px 0px;
    --shadow-md: rgba(0, 0, 0, 0.1) 0px 4px 6px -1px, rgba(0, 0, 0, 0.06) 0px 2px 4px -1px;
    --shadow-lg: rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px;
    --footer-bg: #070d1a;

    /* Theme Variables */
    --theme-bg: #ffffff;
    --theme-text: #070d1a;
    --theme-header-bg: var(--secondary-color);
    --theme-header-text: white;
    --theme-header-border: #d8fd49ff; /* Lime green color for header border */
}

:root.dark-theme {
    --theme-bg: #000000;
    --theme-text: white;
    --theme-header-bg: #000000;
    --theme-header-text: white;
    --theme-header-border: #d8fd49ff; /* Lime green color for header border */
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    font-family: 'Codec Pro', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: white;
    background-color: #000000;
    line-height: 1.5;
}

* {
    box-sizing: border-box;
}

.container {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 100vh;
}

header {
    background-color: #000000;
    padding: 25px 45px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 200;
    position: sticky;
    top: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Add bottom border to header in both modes */
header {
    border-bottom: 1px solid var(--theme-header-border); /* 1pt lime green border */
}

header h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    letter-spacing: -0.5px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-right a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    transition: color 0.2s ease;
}

.header-right a:hover {
    color: var(--primary-color);
}

.main-content {
    flex: 1;
    padding: 60px 40px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    background-color: #ffffff;
    color: #070d1a;
}

.demos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.demo-tile {
    background-color: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    height: 420px; /* Reduced height to minimize whitespace */
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid var(--border-color);
}

.demo-tile:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.demo-tile:hover .demo-image {
    transform: scale(1.05);
}

.demo-tile-active:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.demo-tile-placeholder {
    cursor: not-allowed;
    background-color: white !important;
    position: relative;
}

.demo-tile-placeholder::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.3);
    pointer-events: none;
    z-index: 1;
}

/* Ensure text in placeholder tiles is consistently dark in both themes */
.demo-tile-placeholder .demo-title,
.demo-tile-placeholder .demo-description {
    color: var(--text-color) !important;
}

.demo-tile-placeholder:hover {
    transform: none;
    box-shadow: var(--shadow);
}

.demo-image {
    height: 160px;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    transition: transform 0.5s ease;
    flex-shrink: 0; /* Prevent image from shrinking */
}

.demo-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Align content to the top */
}

.demo-title {
    font-weight: 700;
    font-size: 1.25rem;
    margin: 0 0 10px 0;
    color: var(--text-color);
}

.demo-description {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.4;
    margin-bottom: 12px;
    /* Removed flex-grow to prevent excessive space expansion */
}

.demo-footer {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto; /* Push to bottom of container */
}

.demo-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-lighter);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot.active {
    background-color: var(--success-color);
}

.status-dot.coming-soon {
    background-color: var(--warning-color);
}

.coming-soon-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    font-size: 0.7rem;
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.demo-link {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-block;
    text-align: center;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
}

.demo-link:hover {
    filter: brightness(1.1);
}

.demo-link.disabled {
    cursor: not-allowed;
    opacity: 0.6;
    pointer-events: none;
    background-color: #ccc !important;
    color: #666 !important;
}

.agent-id-form {
    margin: 10px 0;
    margin-bottom: 15px;
}

.agent-id-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    margin: 0;
    transition: all 0.2s ease;
    box-shadow: var(--shadow);
    font-weight: 400;
}

.agent-id-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.agent-id-input::placeholder {
    color: var(--text-lighter);
}

.agent-id-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 4px;
    font-weight: 500;
}

/* Button hover animation */
.demo-link {
    position: relative;
    overflow: hidden;
}

.demo-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.demo-link:hover::after {
    transform: translateX(0);
}

/* App ID section styling */
.agent-id-form {
    background-color: rgba(38, 100, 236, 0.1); /* Blue that matches Glean logo with opacity */
    border-radius: 8px;
    padding: 15px;
    margin: 5px 0 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.agent-id-label {
    color: var(--text-color);
    font-weight: 500;
}

.agent-id-input {
    border: 1px solid rgba(7, 13, 26, 0.1);
    transition: all 0.3s ease;
}

.agent-id-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(38, 100, 236, 0.2);
}

/* Agent ID Customizer UI that replaces the 'Launch Demo' link */
.agent-id-customizer-ui {
    display: flex;
    align-items: center;
    flex-grow: 1; /* Take up available space */
    margin-right: 15px; /* Space before the gear icons */
}

.agent-id-customizer-ui input {
    border: 1px solid var(--border-color);
    outline: none;
    padding: 8px 12px;
    flex-grow: 1;
    background-color: #fff; /* Ensure bg is white */
    font-size: 14px;
    color: var(--text-color);
    margin-right: 8px;
    box-sizing: border-box;
    height: 40px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.agent-id-customizer-ui input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(38, 100, 236, 0.2);
}

.agent-id-customizer-ui .btn-container {
    display: flex;
    align-items: center;
}

.agent-id-customizer-ui button {
    border: none;
    cursor: pointer;
    padding: 0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.agent-id-customizer-ui .apply-btn {
    background: rgba(40, 167, 69, 0.15);
    color: #28a745;
    margin-right: 6px;
}

.agent-id-customizer-ui .apply-btn:hover {
    background: rgba(40, 167, 69, 0.25);
}

.agent-id-customizer-ui .reset-btn {
    background: rgba(0, 123, 255, 0.15);
    color: #007bff;
}

.agent-id-customizer-ui .reset-btn:hover {
    background: rgba(0, 123, 255, 0.25);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .demos-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    
    .main-content {
        padding: 40px 20px;
    }
    
    header {
        padding: 16px 20px;
    }
    
    .welcome-section h2 {
        font-size: 1.8rem;
    }
    
    .welcome-section p {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .demos-grid {
        grid-template-columns: 1fr;
    }
    
    .demo-tile {
        height: auto;
    }
    
    header h1 {
        font-size: 1.2rem;
    }
}

footer {
    background-color: var(--footer-bg, #000000);
    padding: 25px;
    text-align: center;
    color: white;
    font-size: 0.9rem;
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
    position: relative;
}

/* Theme toggle button */
.theme-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
    background-color: rgba(216, 253, 73, 0.15);
    transform: translateY(-2px);
}

.theme-toggle-btn i {
    font-size: 14px;
}

/* Welcome section styling */
.welcome-section {
    margin-bottom: 40px;
    background-color: #000000;
    padding: 30px;
    border-radius: 10px;
    text-align: center; /* Center all text in the welcome section */
}

.welcome-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
    color: #d8fd49ff;
}

.welcome-section p {
    font-size: 1.25rem;
    color: white;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-align: center !important; /* Force center alignment with !important */
}

/* Override paragraph color in light mode */
:root:not(.dark-theme) .welcome-section p {
    color: #000000 !important; /* Force pure black instead of gray with !important */
}

/* Notification styling */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 25px;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
    font-weight: 600;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* Dark/Light Theme Transitions */
/* Apply the same transition to all elements */
html, body, .container, header, .main-content, .welcome-section, .demo-tile, 
.agent-id-form, .agent-id-input, .demo-title, .demo-description, h2, p, 
footer, .demo-content, .demo-footer, .demo-status, .theme-toggle-btn {
    transition: background-color 0.25s ease-in-out, color 0.25s ease-in-out, border-color 0.25s ease-in-out !important;
}

/* Light Theme Demo Tile Styling */
:root:not(.dark-theme) .demo-tile {
    background-color: white;
    color: var(--text-color);
}

/* Keep demo tiles white in both themes */
.demo-tile {
    background-color: white;
    border-color: var(--border-color);
}

/* Demo title and description should always be dark for contrast against white tiles */
.demo-title {
    color: var(--text-color);
}

.demo-description {
    color: var(--text-light);
}

:root.dark-theme .agent-id-form {
    background-color: rgba(38, 100, 236, 0.1); /* Blue with opacity like before */
}

:root.dark-theme .agent-id-label {
    color: white;
}

:root.dark-theme .agent-id-input {
    background-color: white;
    color: var(--text-color);
    border-color: var(--border-color);
}

/* Universal Tooltip Styles */
.universal-tooltip {
    position: absolute;
    display: none;
    width: 320px;
    background-color: #fff;
    color: #343a40;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    padding: 15px 18px;
    z-index: 1001;
    text-align: left;
    border: 1px solid #e9ecef;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    pointer-events: none;
}

.universal-tooltip .tooltip-header {
    font-size: 16px;
    font-weight: 600;
    padding-bottom: 10px;
    margin-bottom: 12px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
}

.universal-tooltip .tooltip-header .fa-info-circle {
    color: #007bff;
    margin-right: 10px;
    font-size: 1.1em;
}

.universal-tooltip .tooltip-body-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
    font-size: 13.5px;
    color: #495057;
    line-height: 1.6;
}

.universal-tooltip .tooltip-body-item i.fa-fw {
    font-size: 1.4em;
    margin-right: 15px;
    width: 22px;
    text-align: center;
    margin-top: 2px;
}

.universal-tooltip .tooltip-body-item .fa-cog { color: #007bff; }
.universal-tooltip .tooltip-body-item .fa-edit { color: #6c757d; }
.universal-tooltip .tooltip-body-item .fa-rocket { color: #28a745; }
.universal-tooltip .tooltip-body-item .fa-undo-alt { color: #007bff; }

.universal-tooltip .tooltip-body-item .inline-icon {
    font-size: 0.9em;
    width: auto;
    margin: 0;
    color: #007bff;
}

.universal-tooltip .tooltip-footer {
    font-size: 11.5px;
    color: #6c757d;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #dee2e6;
    line-height: 1.6;
}

/* Hide the source content that the JS will read from */
.help-tooltip-content {
    display: none;
}

