/* Public Site Styles - Extends base.css */

/* Override card title for public site - less admin-like */
.card-title {
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.75rem;
}

/* Form enhancements */
.form-input:focus {
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.1);
}

.btn-block {
    width: 100%;
}

/* Auth pages */
.auth-container {
    max-width: 400px;
    margin: 4rem auto;
}

.auth-title {
    text-align: center;
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-secondary);
}

/* Profile page */
.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.profile-callsign {
    font-size: 2rem;
    font-weight: 700;
}

.profile-username {
    color: var(--text-secondary);
    font-size: 1rem;
}

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

.stat-item {
    background: var(--bg-primary);
    padding: 1rem;
    border-radius: 4px;
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* News page */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.news-item {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.news-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.news-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.news-version {
    font-weight: 700;
    color: var(--accent);
}

.news-date {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.news-summary {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Lore page */
.lore-page {
    max-width: 100%;
    margin: 0 auto;
}

.lore-intro .lore-sources {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.lore-section {
    margin-bottom: 2rem;
}

.lore-panel {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 4px;
    border: 1px solid var(--border);
}

/* 16:9 aspect ratio, fill width */
.lore-image-16-9 {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.lore-image-16-9 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.lore-img-click:hover {
    opacity: 0.95;
}

/* Text overlay on right with soft dark gradient */
.lore-content-overlay {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: min(420px, 45%);
    display: flex;
    align-items: center;
    background: linear-gradient(to left, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.5) 50%, transparent 100%);
    padding: 1.5rem 2rem;
}

.lore-content-overlay .lore-content {
    max-height: 100%;
    overflow-y: auto;
}

.lore-section .lore-content h2 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: var(--accent);
    font-size: 1.25rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8), 0 2px 6px rgba(0,0,0,0.6);
}

.lore-section .lore-content h3 {
    margin: 0.75rem 0 0.35rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.lore-section .lore-content p,
.lore-section .lore-content ul,
.lore-section .lore-content ol {
    color: rgba(255,255,255,0.9);
    line-height: 1.5;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8), 0 2px 4px rgba(0,0,0,0.6);
}

.lore-section .lore-content ul,
.lore-section .lore-content ol {
    padding-left: 1.25rem;
}

.lore-houses-title {
    margin: 2rem 0 1rem;
    color: var(--accent);
    font-size: 1.5rem;
}

.lore-gallery h2 {
    margin-bottom: 1rem;
}

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

.lore-gallery-grid img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--border);
}

/* Lightbox */
.lore-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.lore-lightbox.open {
    opacity: 1;
    visibility: visible;
}

.lore-lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    font-size: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 4px;
    cursor: pointer;
    line-height: 1;
    transition: background 0.2s;
}

.lore-lightbox-close:hover {
    background: rgba(255,255,255,0.2);
}

.lore-lightbox-img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

@media (max-width: 768px) {
    .lore-content-overlay {
        width: 100%;
        background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 40%, transparent 100%);
        align-items: flex-end;
    }
}

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

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

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

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

.tab-content {
    display: none;
}

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

/* Mech list */
.mech-list {
    display: grid;
    gap: 1rem;
}

.mech-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-primary);
    padding: 1rem;
    border-radius: 4px;
}

.mech-name {
    font-weight: 600;
}

.mech-order {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Danger zone */
.danger-zone {
    border-color: var(--error);
}

.danger-zone .card-title {
    color: var(--error);
}

/* Inline code for hosts entry */
code.hosts-entry {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.2rem 0.5rem;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9em;
    color: var(--accent);
}

/* Download link arrow */
.download-arrow {
    text-decoration: none;
    font-size: 1.1em;
    margin-left: 0.25rem;
}

/* Home page */
.hero {
    text-align: center;
    padding: 4rem 0;
    position: relative;
}

.hero-content {
    position: relative;
    z-index: 5;
}

.hero-logo {
    display: none;
}

.hero-mech {
    display: none;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-title span {
    color: var(--accent);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

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

.feature {
    text-align: center;
    padding: 2rem;
}

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

.feature-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.feature-desc {
    color: var(--text-secondary);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
}

.modal-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Server Status page - uses .card and .card-title from base.css */
/* Rows inside cards */
.status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

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

.status-label {
    color: var(--text-secondary);
}

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

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

.status-dot.ok { background: var(--success); }
.status-dot.error { background: var(--error); }
.status-dot.warning { background: var(--warning); }
.status-dot.unknown { background: var(--text-secondary); }

.status-table-grid {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.status-table-header {
    font-weight: 600;
    color: var(--text-secondary);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.status-table-row {
    display: contents;
}

.status-table-row > * {
    padding: 0.3rem 0;
}

.status-refresh-info {
    text-align: center;
    margin-top: 2rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.status-refresh-countdown {
    font-weight: 600;
    color: var(--accent);
}

.status-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.status-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: status-spin 1s linear infinite;
    margin-right: 0.5rem;
}

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

.status-error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error);
    border-radius: 8px;
    padding: 1rem;
    color: var(--error);
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .profile-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}
