/* ==========================================================================
   Components CSS - MoltShell
   Buttons, Cards, Navigation, Footer, Theme Toggle, Badges
   ========================================================================== */

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 1rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

.logo {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 1.5em;
    font-weight: 700;
    color: var(--primary-blue);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
}

/* Neon theme logo gradient */
.theme-neon .logo {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 2.25rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95em;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-blue);
}

.theme-neon .nav-links a:hover,
.theme-neon .nav-links a.active {
    color: var(--text-primary);
}

.nav-links a.btn-primary {
    color: white;
}

.nav-links a.btn-primary:hover {
    color: white;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 600;
    font-size: 0.95em;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--gradient-primary, linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 51, 153, 0.25);
}

[data-theme="dark"] .btn-primary:hover {
    box-shadow: 0 4px 12px rgba(77, 124, 201, 0.25);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

.btn-secondary:hover {
    background: var(--primary-blue);
    color: white;
}

.btn-sm {
    padding: 0.625rem 1.5rem;
    font-size: 0.9em;
}

/* Neon theme buttons */
.theme-neon .btn {
    border-radius: 50px;
}

.theme-neon .btn-primary {
    background: var(--gradient-1);
    box-shadow: 0 4px 20px rgba(255,110,180,0.25);
}

.theme-neon .btn-primary:hover {
    box-shadow: 0 10px 40px rgba(255,110,180,0.35);
}

.theme-neon[data-theme="light"] .btn-primary {
    box-shadow: 0 4px 20px rgba(30,86,160,0.25);
}

.theme-neon[data-theme="light"] .btn-primary:hover {
    box-shadow: 0 8px 30px rgba(30,86,160,0.35);
}

/* --------------------------------------------------------------------------
   Theme Toggle
   -------------------------------------------------------------------------- */
.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1em;
    transition: all 0.2s ease;
    margin-right: 1rem;
}

.theme-toggle:hover {
    border-color: var(--primary-blue);
}

.theme-neon .theme-toggle {
    border-radius: 50%;
}

.theme-neon .theme-toggle:hover {
    border-color: var(--accent-pink);
    transform: scale(1.05);
}

[data-theme="light"] .theme-toggle {
    box-shadow: var(--card-shadow);
}

/* Mobile Theme Toggle */
.mobile-theme-toggle {
    display: none;
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    cursor: pointer;
    font-size: 1.2em;
    z-index: 1000;
    box-shadow: var(--card-shadow);
    transition: all 0.2s ease;
    align-items: center;
    justify-content: center;
}

.mobile-theme-toggle:hover {
    transform: scale(1.05);
}

.theme-neon .mobile-theme-toggle {
    border-radius: 50%;
    font-size: 1.4em;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.theme-neon[data-theme="light"] .mobile-theme-toggle {
    box-shadow: 0 4px 12px rgba(30,86,160,0.2);
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover);
    border-color: var(--primary-blue);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-size: 1.2em;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.card-title .icon {
    font-size: 1.2em;
}

/* Feature Cards */
.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover);
    border-color: var(--primary-blue);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: var(--gradient-primary, linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.feature-icon svg {
    width: 28px;
    height: 28px;
    stroke: white;
    fill: none;
    stroke-width: 2;
}

.feature-card h3 {
    font-size: 1.25em;
    margin-bottom: 0.75rem;
}

.feature-card p {
    font-size: 1em;
    line-height: 1.7;
}

.feature-agent {
    margin-top: 0.75rem;
    padding: 0.625rem 0.875rem;
    background: linear-gradient(135deg, rgba(0, 51, 153, 0.08), rgba(201, 162, 39, 0.08));
    border-radius: 8px;
    font-size: 0.9em;
    color: var(--text-secondary);
    border-left: 3px solid var(--accent-gold);
}

.feature-agent em {
    color: var(--primary-blue);
    font-style: normal;
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   Stat Cards
   -------------------------------------------------------------------------- */
.stat-card {
    text-align: center;
    padding: 1.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

.stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.8em;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.85em;
    color: var(--text-muted);
    font-weight: 500;
}

/* Neon theme stat cards */
.theme-neon .stat-value {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --------------------------------------------------------------------------
   Badges
   -------------------------------------------------------------------------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.9em;
    color: var(--text-secondary);
}

.badge .dot {
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

.security-badge {
    background: linear-gradient(135deg, rgba(0, 51, 153, 0.1), rgba(5, 150, 105, 0.1));
    border: 1px solid var(--accent-green);
    color: var(--accent-green);
    font-weight: 600;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
}

.status-success {
    background: rgba(5, 150, 105, 0.15);
    color: var(--accent-green);
}

.status-pending {
    background: rgba(217, 119, 6, 0.15);
    color: var(--accent-yellow);
}

.status-failed {
    background: rgba(220, 38, 38, 0.15);
    color: var(--accent-red);
}

.theme-neon .status-success {
    background: rgba(0,255,136,0.15);
    color: #00ff88;
}

.theme-neon .status-pending {
    background: rgba(255,217,61,0.15);
    color: #ffd93d;
}

.theme-neon .status-failed {
    background: rgba(255,71,87,0.15);
    color: #ff4757;
}

/* --------------------------------------------------------------------------
   Callout / Alert Boxes
   -------------------------------------------------------------------------- */
.callout {
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    border-left: 4px solid;
}

.callout-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.callout p {
    margin: 0;
}

.callout-warning {
    background: rgba(217, 119, 6, 0.1);
    border-color: var(--accent-yellow);
}

.callout-info {
    background: rgba(0, 51, 153, 0.1);
    border-color: var(--primary-blue);
}

.callout-tip {
    background: rgba(5, 150, 105, 0.1);
    border-color: var(--accent-green);
}

.theme-neon .callout-warning {
    background: rgba(251,191,36,0.1);
    border-color: #fbbf24;
}

.theme-neon .callout-info {
    background: rgba(0,212,255,0.1);
    border-color: #00d4ff;
}

.theme-neon .callout-tip {
    background: rgba(0,255,136,0.1);
    border-color: #00ff88;
}

/* Warning Box (used in security/legal pages) */
.warning-box {
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.1), rgba(201, 162, 39, 0.05));
    border: 1px solid var(--accent-gold);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
}

.warning-box strong {
    color: var(--accent-gold);
}

.warning-box p {
    margin: 0;
}

/* Intro Box */
.intro-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
}

.intro-box p {
    margin: 0;
    color: var(--text-secondary);
}

.intro-box strong {
    color: var(--primary-blue);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
footer {
    padding: 4rem 1.5rem 2.5rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand {
    max-width: 300px;
}

.footer-brand .logo {
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9em;
    line-height: 1.7;
}

.footer-links-group {
    display: flex;
    gap: 5rem;
}

.footer-column h4 {
    font-size: 0.9em;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-column a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9em;
    padding: 0.375rem 0;
    transition: color 0.2s;
}

.footer-column a:hover {
    color: var(--primary-blue);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copy {
    color: var(--text-muted);
    font-size: 0.85em;
}

.footer-copy a {
    color: inherit;
    text-decoration: underline;
}

.footer-legal {
    display: flex;
    gap: 1.5rem;
}

.footer-legal a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85em;
    transition: color 0.2s;
}

.footer-legal a:hover {
    color: var(--primary-blue);
}

/* Simple footer for legal pages */
.footer-simple {
    margin-top: 3.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-simple a {
    color: var(--text-secondary);
}

.footer-simple a:hover {
    color: var(--primary-blue);
}

/* --------------------------------------------------------------------------
   Loading States
   -------------------------------------------------------------------------- */
.loading {
    text-align: center;
    padding: 3.75rem 1.25rem;
    color: var(--text-muted);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.theme-neon .loading-spinner {
    border-top-color: var(--accent-pink);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Error State */
.error-state {
    text-align: center;
    padding: 3.75rem 1.25rem;
    color: var(--accent-red);
}

.error-state .icon {
    font-size: 3em;
    margin-bottom: 1rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 2.5rem 1.25rem;
    color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Toast Notifications
   -------------------------------------------------------------------------- */
.toast {
    position: fixed;
    bottom: 5rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-card);
    border: 1px solid var(--accent-green);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9em;
    opacity: 0;
    transition: all 0.3s;
    z-index: 2000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* --------------------------------------------------------------------------
   Refresh Indicator
   -------------------------------------------------------------------------- */
.refresh-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.85em;
}

.refresh-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* --------------------------------------------------------------------------
   Copy Button
   -------------------------------------------------------------------------- */
.copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    font-size: 0.85em;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.copy-btn:hover {
    opacity: 1;
}

.copy-btn.copied {
    color: var(--accent-green);
}
