/* MultiAI Hub - Main Stylesheet */

:root {
    --primary: #00d4ff;
    --secondary: #7c3aed;
    --dark: #0a0e27;
    --darker: #050714;
    --light: #f8fafc;
    --gray: #64748b;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --border: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, var(--darker) 0%, var(--dark) 100%);
    color: var(--light);
    line-height: 1.6;
    min-height: 100vh;
}

/* Navbar */
.navbar {
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
}

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

.logo-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--gray);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary);
    background: rgba(0, 212, 255, 0.1);
}

/* Hero Section */
.hero {
    max-width: 1400px;
    margin: 4rem auto;
    padding: 0 2rem;
    text-align: center;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tagline {
    font-size: 1.5rem;
    color: var(--gray);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--light);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

.hero-stats {
    display: flex;
    gap: 3rem;
    justify-content: center;
    margin-top: 3rem;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary);
}

.stat-label {
    color: var(--gray);
    margin-top: 0.5rem;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Features Section */
.features {
    padding: 4rem 0;
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

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

.feature-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--gray);
    margin-bottom: 1rem;
}

.feature-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.feature-link:hover {
    text-decoration: underline;
}

/* Infrastructure Section */
.infrastructure {
    padding: 4rem 0;
    background: rgba(0, 0, 0, 0.3);
}

.infrastructure h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

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

.infra-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
}

.infra-card h4 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.infra-card ul {
    list-style: none;
}

.infra-card li {
    padding: 0.5rem 0;
    color: var(--gray);
    border-bottom: 1px solid var(--border);
}

.infra-card li:last-child {
    border-bottom: none;
}

/* Page Content */
.page-content {
    padding: 4rem 2rem;
    min-height: calc(100vh - 200px);
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Proxy Specific */
.proxy-container {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.proxy-input-section {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
}

.proxy-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.proxy-input {
    flex: 1;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--light);
    font-size: 1rem;
}

.proxy-input:focus {
    outline: none;
    border-color: var(--primary);
}

.quick-links {
    margin: 2rem 0;
}

.quick-links h3 {
    margin-bottom: 1rem;
    color: var(--primary);
}

.quick-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--light);
    cursor: pointer;
    transition: all 0.3s;
}

.quick-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.proxy-info {
    background: rgba(0, 212, 255, 0.05);
    border: 1px solid var(--primary);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin: 2rem 0;
}

.proxy-info h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.proxy-info ul {
    list-style: none;
}

.proxy-info li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.proxy-info li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary);
}

.warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--warning);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 1rem;
    color: var(--warning);
}

.proxy-stats {
    margin-top: 2rem;
}

.proxy-stats h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.stat-row:last-child {
    border-bottom: none;
}

.proxy-frame-section {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 1rem;
    overflow: hidden;
}

.proxy-controls {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.control-btn {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--light);
    cursor: pointer;
    transition: all 0.3s;
}

.control-btn:hover {
    background: var(--primary);
}

.current-url {
    flex: 1;
    color: var(--gray);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.proxy-frame {
    height: 800px;
    background: white;
}

.proxy-placeholder {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--gray);
}

.placeholder-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
}

/* Email Grid */
.email-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.email-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
}

.email-card.primary {
    border-color: var(--primary);
    background: rgba(0, 212, 255, 0.05);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.email-info-section {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 3rem;
}

.config-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.tab-btn {
    padding: 1rem 2rem;
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.config-table {
    margin: 1rem 0;
}

.config-row {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.config-row:last-child {
    border-bottom: none;
}

.config-label {
    font-weight: 600;
    color: var(--primary);
}

.config-value {
    color: var(--gray);
    font-family: 'Courier New', monospace;
}

.note {
    color: var(--warning);
    margin-top: 1rem;
    font-style: italic;
}

.email-features {
    margin-top: 3rem;
}

.feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 0.5rem;
}

.feature-check {
    color: var(--success);
    font-size: 1.5rem;
    font-weight: bold;
}

/* Dashboard */
.service-categories {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.category h2 {
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.service-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-left: 4px solid var(--danger);
    border-radius: 0.5rem;
    padding: 1.5rem;
    transition: all 0.3s;
}

.service-card.running {
    border-left-color: var(--success);
}

.service-card:hover {
    transform: translateX(5px);
    border-color: var(--primary);
}

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

.service-header h3 {
    color: var(--light);
    font-size: 1.1rem;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--danger);
}

.service-card.running .status-dot {
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
}

.service-card p {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.service-links {
    display: flex;
    gap: 1rem;
}

.service-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
}

.service-link:hover {
    text-decoration: underline;
}

.resource-stats {
    margin-top: 4rem;
}

.resource-stats h2 {
    color: var(--primary);
    margin-bottom: 2rem;
    text-align: center;
}

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

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.stat-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.stat-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.stat-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.5s;
}

.stat-card p {
    color: var(--gray);
    font-size: 0.9rem;
}

/* Status Page */
.overall-status {
    margin-top: 1rem;
}

.status-indicator {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
}

.status-indicator.operational {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
    border: 1px solid var(--success);
}

.status-grid {
    display: grid;
    gap: 2rem;
    margin-top: 3rem;
}

.status-category {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
}

.status-category h2 {
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

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

.status-info h3 {
    color: var(--light);
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.status-info p {
    color: var(--gray);
    font-size: 0.9rem;
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.status-item.operational .status-badge {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

.uptime-section {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    margin-top: 3rem;
}

.uptime-section h2 {
    color: var(--primary);
    margin-bottom: 2rem;
}

.uptime-chart {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.uptime-bar {
    display: flex;
    gap: 0.25rem;
}

.day {
    width: 40px;
    height: 40px;
    border-radius: 0.25rem;
    cursor: pointer;
}

.day.up {
    background: var(--success);
}

.day.down {
    background: var(--danger);
}

.uptime-chart p {
    margin-top: 1rem;
    color: var(--gray);
}

.metrics-section {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    margin-top: 3rem;
}

.metrics-section h2 {
    color: var(--primary);
    margin-bottom: 2rem;
}

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

.metric-card {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0.5rem;
    padding: 1.5rem;
    text-align: center;
}

.metric-card h3 {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.metric-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.metric-label {
    color: var(--gray);
    font-size: 0.8rem;
}

/* API Page */
.api-section {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
}

.api-section h2 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.api-section code {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    color: var(--primary);
    font-family: 'Courier New', monospace;
}

.api-endpoints {
    margin-top: 2rem;
}

.api-endpoints h2 {
    color: var(--primary);
    margin-bottom: 2rem;
}

.endpoint-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.endpoint-header {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.method {
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.method.get {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success);
}

.method.post {
    background: rgba(0, 212, 255, 0.2);
    color: var(--primary);
}

.endpoint-header code {
    background: none;
    color: var(--light);
    font-size: 1.1rem;
}

.code-block {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 1rem;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    color: var(--gray);
    white-space: pre;
}

.resource-list {
    list-style: none;
}

.resource-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.resource-list li:last-child {
    border-bottom: none;
}

.resource-list a {
    color: var(--primary);
    text-decoration: none;
}

.resource-list a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    background: rgba(0, 0, 0, 0.5);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    text-align: center;
    color: var(--gray);
    margin-top: 4rem;
}

footer a {
    color: var(--primary);
    text-decoration: none;
    margin: 0 0.5rem;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .proxy-container {
        grid-template-columns: 1fr;
    }

    .nav-menu {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
}
