/* Harbor Registry Status Website Styles */

:root {
    --primary-color: #001f3f;
    --primary-dark: #001229;
    --primary-light: #003366;
    --accent-color: #D4AF37;
    --accent-light: #F4D03F;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #f9fafb;
    --white: #ffffff;
    --border-color: #e5e7eb;
    --code-bg: #f3f4f6;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    padding: 1.5rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

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

.logo img {
    height: 32px;
    width: auto;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent-light);
}

.support-info a {
    color: var(--accent-light);
    text-decoration: none;
}

.support-info a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Main Content */
main {
    padding: 2rem 0;
}

.section {
    background: var(--white);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.section h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-color);
}

/* Info Box */
.info-box {
    background: var(--code-bg);
    border-left: 4px solid var(--accent-color);
    padding: 1rem;
    border-radius: 0 4px 4px 0;
}

.info-box p {
    margin-bottom: 0.5rem;
}

.info-box p:last-child {
    margin-bottom: 0;
}

code {
    background: var(--code-bg);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
    color: var(--primary-dark);
}

.note {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* Table */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: var(--primary-color);
    color: var(--accent-light);
    font-weight: 600;
}

tr:hover {
    background: var(--bg-color);
}

/* Channels Grid */
.channels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.channel-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    transition: box-shadow 0.2s;
}

.channel-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-color);
}

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

.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.tag.release {
    background: #dcfce7;
    color: #166534;
}

.tag.staging {
    background: #fef3c7;
    color: #92400e;
}

.channel-card code {
    display: inline-block;
    margin-top: 0.5rem;
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.tab-button {
    padding: 0.75rem 1.5rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-light);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.tab-button:hover {
    color: var(--primary-color);
}

.tab-button.active {
    color: var(--primary-color);
    border-bottom-color: var(--accent-color);
    font-weight: 500;
}

.tab-content {
    min-height: 300px;
}

.tab-pane {
    display: none;
}

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

.tab-pane h4 {
    margin: 1.5rem 0 0.5rem 0;
    color: var(--text-color);
}

.tab-pane h4:first-child {
    margin-top: 0;
}

.tab-pane pre {
    background: var(--code-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1rem;
    overflow-x: auto;
}

.tab-pane pre code {
    background: none;
    padding: 0;
    color: var(--text-color);
}

/* Health Status */
.health-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.overall-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    background: var(--code-bg);
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-indicator.healthy {
    background: var(--success-color);
}

.status-indicator.degraded {
    background: var(--warning-color);
}

.status-indicator.error {
    background: var(--error-color);
}

.status-indicator.loading {
    background: var(--text-light);
}

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

.status-text {
    font-weight: 500;
}

.btn-refresh {
    padding: 0.5rem 1rem;
    background: var(--accent-color);
    color: var(--primary-dark);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-refresh:hover {
    background: var(--accent-light);
}

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

.health-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.health-card .indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.health-card .indicator.running {
    background: var(--success-color);
}

.health-card .indicator.stopped {
    background: var(--error-color);
}

.health-card .indicator.unknown {
    background: var(--text-light);
}

.health-card .details {
    flex: 1;
    min-width: 0;
}

.health-card .service-name {
    font-weight: 500;
    color: var(--text-color);
}

.health-card .service-desc {
    font-size: 0.8rem;
    color: var(--text-light);
}

.last-updated {
    text-align: right;
}

/* Footer */
footer {
    background: var(--primary-dark);
    color: var(--white);
    padding: 2rem 0;
    margin-top: 2rem;
}

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

.footer-section h4 {
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.footer-section a {
    color: var(--accent-light);
    text-decoration: none;
}

.footer-section a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.copyright {
    opacity: 0.7;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .tabs {
        flex-wrap: wrap;
    }

    .tab-button {
        flex: 1;
        min-width: 100px;
    }

    .health-header {
        flex-direction: column;
        gap: 1rem;
    }

    .overall-status {
        width: 100%;
        justify-content: center;
    }

    .btn-refresh {
        width: 100%;
    }
}
