/* Modern Dashboard Styles - Pure CSS */

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

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --success: #10b981;
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.5);
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --border: rgba(148, 163, 184, 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Animated gradient background */
.gradient-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
    z-index: -2;
}

.gradient-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 50%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    margin-bottom: 2rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.header-title h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.header-title p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0.25rem 0 0 0;
}

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

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 20px;
    color: var(--success);
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.status-indicator.operational {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
}

.status-indicator.operational .status-dot {
    background: var(--success);
}

.status-indicator.operational .status-text {
    color: var(--success);
}

.status-indicator.degraded {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.3);
}

.status-indicator.degraded .status-dot {
    background: #fbbf24;
}

.status-indicator.degraded .status-text {
    color: #fbbf24;
}

.status-indicator.offline {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

.status-indicator.offline .status-dot {
    background: #ef4444;
}

.status-indicator.offline .status-text {
    color: #ef4444;
}


.logout-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-button:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(239, 68, 68, 0.5);
    color: #ef4444;
    transform: translateY(-1px);
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon svg {
    width: 48px;
    height: 48px;
    filter: drop-shadow(0 4px 6px rgba(99, 102, 241, 0.4));
}

.logo-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-text .subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

.status-text {
    font-size: 0.875rem;
    color: var(--success);
    font-weight: 500;
}

/* Hero Card */
.hero-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 3rem;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* Hero Content with Logo Layout */
.hero-content-with-logo {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
    margin-bottom: 2.5rem;
}

/* Hero Logo - Round appearance without square background */
.hero-logo-section {
    flex-shrink: 0;
}

.hero-logo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    /* Perfectly round */
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.4);
    object-fit: cover;
    background: transparent;
    /* No background */
}

.hero-text-section {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 20px;
    margin-bottom: 1.5rem;
    align-self: flex-end;
    /* Right align within flex container */
    color: var(--success);
    font-size: 0.875rem;
    font-weight: 600;
}

.card-glow {
    position: relative;
    overflow: hidden;
}

.card-glow::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    /* animation: rotate-glow 20s linear infinite; - Removed per user feedback */
    pointer-events: none;
    z-index: 0;
}

.card-content,
.hero-image {
    position: relative;
    z-index: 1;
}

@keyframes rotate-glow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.card-content {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 999px;
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 1000px;
    /* Widened per user request */
    margin-bottom: 2rem;
}

.hero-image {
    width: 65%;
    max-width: 100%;
    margin: 0 auto 1.5rem auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 2rem;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* CTA Button */
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 1.75rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(99, 102, 241, 0.5);
}

.cta-button svg {
    transition: transform 0.3s ease;
}

.cta-button:hover svg {
    transform: translateX(4px);
}

/* Both primary and secondary buttons use gradient */
.cta-button.secondary-cta {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border: none;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.cta-button.secondary-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(99, 102, 241, 0.5);
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.info-card {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.info-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.3);
}

.info-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.info-card p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Footer */
.footer {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .hero-card {
        padding: 2rem 1.5rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Bedrock Chat Widget */
.chat-widget {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    font-family: 'Inter', sans-serif;
}

.chat-toggle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    transition: all 0.3s ease;
    border: none;
    color: white;
}

.chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(99, 102, 241, 0.6);
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: #0f172a;
    /* Dark theme match */
    border: 1px solid var(--border);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    transform-origin: bottom right;
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.9);
}

.chat-window.active {
    opacity: 1;
    pointer-events: all;
    transform: scale(1);
}

.chat-header {
    padding: 1rem;
    background: rgba(99, 102, 241, 0.1);
    border-bottom: 1px solid var(--border);
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: white;
    margin: 0;
}

.close-chat {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.5rem;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    max-width: 80%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.message.user {
    align-self: flex-end;
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 2px;
}

.message.bot {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-bottom-left-radius: 2px;
}

.chat-input-area {
    padding: 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 0.5rem;
}

.chat-input-area input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.75rem 1rem;
    color: white;
    outline: none;
}

.chat-input-area input:focus {
    border-color: var(--primary);
}

.chat-send {
    background: var(--primary);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.chat-send:hover {
    background: var(--primary-dark);
}

/* Staff Meeting Modal */
.staff-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.staff-modal.active {
    opacity: 1;
    pointer-events: all;
}

/* Info cards grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 2rem 0 3rem 0;
    /* Added spacing above and below */
}

.staff-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
    /* Added consistent spacing */
}

.staff-member {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    opacity: 0.3;
    transition: all 0.3s ease;
}

.staff-member.active {
    opacity: 1;
    transform: scale(1.1);
}

.staff-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bg-card), var(--bg-dark));
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.staff-member.active .staff-avatar {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.6);
    animation: pulse-speak 1s infinite alternate;
}

@keyframes pulse-speak {
    from {
        box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
    }

    to {
        box-shadow: 0 0 25px rgba(99, 102, 241, 0.8);
    }
}

.staff-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.staff-status {
    font-size: 0.8rem;
    color: var(--text-secondary);
    max-width: 150px;
    text-align: center;
    height: 40px;
    /* Fixed height for text stability */
}

.meeting-log {
    width: 600px;
    height: 200px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    overflow-y: auto;
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--success);
}

.admin-trigger {
    position: absolute;
    top: 1rem;
    right: 3rem;
    /* Left of the chat close button? No, chat is bottom right. */
    right: 1rem;
    /* Header position */
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.2;
    transition: opacity 0.3s;
}

.admin-trigger:hover {
    opacity: 1;
}

/* Antigravity Admin Panel Styles */
.ag-trigger {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ag-trigger:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(99, 102, 241, 0.6);
}

.ag-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.ag-modal.active {
    opacity: 1;
    pointer-events: all;
}

.pc-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #1a1d2e;
    /* Solid dark background instead of transparent */
    border-radius: 16px;
}

.ag-container {
    width: 90%;
    max-width: 900px;
    height: 80vh;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.ag-header {
    padding: 1.5rem;
    background: rgba(99, 102, 241, 0.1);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.ag-logo {
    font-size: 2rem;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.6));
    }

    50% {
        filter: drop-shadow(0 0 20px rgba(99, 102, 241, 1));
    }
}

.ag-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.ag-header p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.ag-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.ag-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.ag-messages {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.ag-message {
    display: flex;
    gap: 1rem;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ag-message.ag-user {
    justify-content: flex-end;
}

.ag-message.ag-user .ag-text {
    background: var(--primary);
    color: white;
    padding: 1rem 1.25rem;
    border-radius: 16px 16px 4px 16px;
    max-width: 70%;
}

.ag-message.ag-assistant {
    justify-content: flex-start;
}

.ag-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.ag-content {
    flex: 1;
    max-width: 70%;
}

.hero-description {
    font-size: 1.125rem;
    line-height: 1.75;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    /* Added padding below description text */
}

.ag-text {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem 1.25rem;
    border-radius: 16px 16px 16px 4px;
    line-height: 1.6;
    color: var(--text-primary);
}

.ag-text code {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.ag-text pre {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 0.5rem 0;
}

.ag-text pre code {
    background: none;
    padding: 0;
}

.ag-message.ag-system .ag-text {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.ag-system-badge {
    display: inline-block;
    background: var(--success);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.ag-typing-indicator {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
}

.ag-typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.ag-typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.ag-typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {

    0%,
    60%,
    100% {
        opacity: 0.3;
        transform: scale(0.8);
    }

    30% {
        opacity: 1;
        transform: scale(1);
    }
}

.ag-input-area {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.2);
}

.ag-input-area textarea {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    resize: none;
    outline: none;
    transition: all 0.2s;
}

.ag-input-area textarea:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

.ag-send {
    width: 48px;
    height: 48px;
    background: var(--primary);
    border: none;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.ag-send:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* Responsive */
@media (max-width: 768px) {
    .ag-container {
        width: 100%;
        height: 100vh;
        border-radius: 0;
    }

    .ag-content {
        max-width: 85%;
    }

    .ag-message.ag-user .ag-text {
        max-width: 85%;
    }
}

/* Public Chat Widget Styles */
.pc-trigger {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
    transition: all 0.3s ease;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse-green 3s ease-in-out infinite;
}

@keyframes pulse-green {

    0%,
    100% {
        box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
    }

    50% {
        box-shadow: 0 6px 30px rgba(16, 185, 129, 0.8);
    }
}

.pc-trigger:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(16, 185, 129, 0.6);
}

.pc-modal {
    position: fixed;
    bottom: 6rem;
    left: 2rem;
    z-index: 1500;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    transform: translateY(20px);
}

.pc-modal.active {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.pc-container {
    width: 400px;
    height: 600px;
    background: #1a202c;
    border: 1px solid var(--border);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.pc-header {
    padding: 1rem;
    background: rgba(16, 185, 129, 0.1);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pc-header-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pc-logo {
    font-size: 1.5rem;
}

.pc-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.pc-header p {
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.pc-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.pc-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.pc-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    background: #0a0e1a;
}

.pc-message {
    display: flex;
    gap: 0.75rem;
    animation: slideIn 0.3s ease;
}

.pc-message.pc-user {
    justify-content: flex-end;
}

.pc-message.pc-user .pc-text {
    background: var(--success);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 12px 12px 2px 12px;
    max-width: 75%;
    font-size: 0.9rem;
}

.pc-message.pc-assistant {
    justify-content: flex-start;
}

.pc-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #059669);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.pc-content {
    flex: 1;
    max-width: 75%;
}

.pc-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.pc-text {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.75rem 1rem;
    border-radius: 12px 12px 12px 2px;
    line-height: 1.5;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.pc-text code {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
}

.pc-text pre {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.75rem;
    border-radius: 6px;
    overflow-x: auto;
    margin: 0.5rem 0;
}

.pc-text pre code {
    background: none;
    padding: 0;
}

.pc-message.pc-error .pc-text {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.pc-typing-indicator {
    display: flex;
    gap: 0.4rem;
    padding: 0.75rem;
}

.pc-typing-indicator span {
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.pc-typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.pc-typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

.pc-input-area {
    padding: 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
}

.pc-input-area textarea {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    resize: none;
    outline: none;
    transition: all 0.2s;
}

.pc-input-area textarea:focus {
    border-color: var(--success);
    background: rgba(255, 255, 255, 0.08);
}

.pc-send {
    width: 40px;
    height: 40px;
    background: var(--success);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.pc-send:hover {
    background: #059669;
    transform: scale(1.05);
}

/* Mobile Responsiveness for Public Chat */
@media (max-width: 768px) {
    .pc-trigger {
        bottom: 1.5rem;
        left: 1.5rem;
    }

    .pc-modal {
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
    }

    .pc-container {
        width: 100%;
        height: 100vh;
        border-radius: 0;
    }

    .pc-content {
        max-width: 85%;
    }

    .pc-message.pc-user .pc-text {
        max-width: 85%;
    }
}

/* Ensure admin and public chat don't overlap */
@media (min-width: 769px) {

    /* Admin gear is bottom-right, public chat is bottom-left */
    .ag-trigger {
        bottom: 2rem;
        right: 2rem;
    }

    .pc-trigger {
        bottom: 2rem;
        left: 2rem;
    }
}

/* ===== PORTFOLIO SHOWCASE STYLES ===== */

/* Main content with sidebar layout */
.content-with-sidebar {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.main-content-area {
    flex: 1;
    min-width: 0;
    /* Prevent flex overflow */
}

/* Bacteriophage Widget Sidebar */
.phage-widget {
    position: sticky;
    top: 2rem;
    width: 320px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.phage-widget:hover {
    border-color: var(--primary);
    box-shadow: 0 6px 30px rgba(99, 102, 241, 0.2);
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.widget-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.widget-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 12px;
    font-weight: 500;
    color: white;
}

.phage-widget iframe {
    width: 100%;
    height: 350px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #000;
}

.widget-description {
    margin: 0.75rem 0 0 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Portfolio Section */
.portfolio-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.section-title {
    margin: 0 0 2rem 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* Portfolio Cards */
.portfolio-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.portfolio-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.2);
}

.card-thumbnail {
    position: relative;
    overflow: hidden;
    background: #000;
}

.card-thumbnail iframe {
    display: block;
    width: 100%;
    height: 315px;
    border: none;
}

.card-thumbnail a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.card-preview {
    width: 100%;
    height: 100%;
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.card-overlay span {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 8px;
}

.card-thumbnail:hover .card-overlay {
    opacity: 1;
}

.card-content {
    padding: 1.5rem;
}

.card-content h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-content p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .phage-widget {
        width: 280px;
    }

    .phage-widget iframe {
        height: 300px;
    }
}

@media (max-width: 1024px) {
    .content-with-sidebar {
        flex-direction: column-reverse;
    }

    .phage-widget {
        position: relative;
        width: 100%;
        max-width: 600px;
        margin: 0 auto;
        top: 0;
    }

    .phage-widget iframe {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .phage-widget {
        padding: 1rem;
    }

    .phage-widget iframe {
        height: 350px;
    }

    .card-content {
        padding: 1.25rem;
    }

    .card-content h3 {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .content-with-sidebar {
        gap: 1.5rem;
    }

    .portfolio-section {
        margin-top: 2rem;
    }

    .card-thumbnail iframe {
        height: 250px;
    }

    .phage-widget iframe {
        height: 300px;
    }
}

/* Bento Grid System (from Bedrock) */
.bento-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    grid-template-rows: auto auto;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.bento-visual {
    grid-column: 1;
    grid-row: 1;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.bento-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.visual-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    color: white;
}

.visual-overlay h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.visual-overlay p {
    margin: 0.5rem 0 0 0;
    color: rgba(255, 255, 255, 0.8);
}

.bento-data {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: 400px;
}

.data-card {
    flex: 1;
    background: rgba(16, 24, 39, 0.6);
    border: 1px solid rgba(74, 144, 226, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.link-card {
    text-decoration: none;
    color: white;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border-color: rgba(99, 102, 241, 0.3);
}

.link-card:hover {
    transform: translateY(-4px);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
    border-color: #818cf8;
}

.icon-large {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.data-card h4 {
    margin: 0 0 5px 0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

.data-card p {
    margin: 0;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.bento-strategy {
    grid-column: 1 / -1;
    grid-row: 2;
    padding: 2.5rem;
    background: linear-gradient(90deg, rgba(16, 24, 39, 0.9), rgba(28, 35, 51, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.strategy-content {
    flex: 1;
}

.cta-row {
    display: flex;
    gap: 1rem;
}

/* Mobile Response */
@media (max-width: 768px) {
    .bento-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .bento-visual,
    .bento-data,
    .bento-strategy {
        grid-column: 1;
        grid-row: auto;
        height: auto;
    }

    .bento-visual {
        height: 250px;
    }

    .bento-data {
        height: auto;
        flex-direction: row;
    }

    .bento-strategy {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Project Viewer Modal */
.project-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-modal.active {
    opacity: 1;
    pointer-events: all;
}

.project-container {
    width: 90%;
    height: 85%;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-modal.active .project-container {
    transform: scale(1);
}

#project-frame {
    width: 100%;
    height: 100%;
    display: block;
}

.project-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 3001;
}

.project-close:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
    transform: rotate(90deg);
}