:root {
    /* THEME: Caversia / Visual Portal */
    --bg-body: #0b0d12;
    --bg-card: #151922;
    --bg-header: #11141a;
    --accent: #00b0ff;
    --accent-glow: rgba(0, 176, 255, 0.15);
    --accent-red: #ff4757; 
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --border: 1px solid rgba(255, 255, 255, 0.08);
    --placeholder-border: 2px dashed #2a3b55;
}

body {
    background-color: var(--bg-body);
    background-image: radial-gradient(circle at 50% 0%, #1a233a 0%, var(--bg-body) 60%);
    color: var(--text-main);
    font-family: 'Segoe UI', Tahoma, Geneva, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* --- NAV --- */
.navbar {
    background: var(--bg-header);
    border-bottom: var(--border);
    height: 70px;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
}
.nav-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.brand { font-size: 1.5rem; font-weight: 900; letter-spacing: 1px; color: #fff; text-transform: uppercase; text-decoration: none; }
.brand span { color: var(--accent); }
.nav-links { display: flex; gap: 25px; align-items: center; }
.nav-item { color: #94a3b8; text-decoration: none; font-weight: bold; font-size: 0.9rem; text-transform: uppercase; transition: color 0.2s; }
.nav-item:hover { color: #fff; }

/* --- LAYOUT --- */
.container { max-width: 1400px; margin: 0 auto; padding: 40px 30px; }
.section-label { font-size: 1.2rem; font-weight: 800; color: #fff; text-transform: uppercase; margin-bottom: 20px; border-left: 4px solid var(--accent); padding-left: 15px; }

/* --- FEATURED HERO --- */
.featured-card {
    display: flex;
    background: var(--bg-card);
    border: var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 60px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    min-height: 400px;
}
.featured-img-slot { flex: 2; background: #0f1219; position: relative; border-right: var(--border); }
.featured-info { 
    flex: 1; 
    padding: 0;
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
}

.feat-body { padding: 40px; flex-grow: 1; }
.feat-title { font-size: 3rem; font-weight: 900; line-height: 1; color: #fff; margin-bottom: 15px; text-transform: uppercase; }
.feat-desc { color: var(--text-muted); font-size: 1.1rem; line-height: 1.6; margin-bottom: 30px; }

/* FOOTER STRIP (Symmetric 15px Padding) */
.feat-footer {
    background: rgba(0, 0, 0, 0.4); 
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px 30px; /* 15px Left and Right */
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}
.feat-stat { color: #fff; font-weight: 700; font-size: 1rem; display: flex; align-items: center; gap: 10px; }

/* --- GRID CARDS --- */
.portal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 30px; }
.plugin-card {
    background: var(--bg-card);
    border: var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, border-color 0.2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    text-decoration: none;
}
.plugin-card:hover { transform: translateY(-8px); border-color: var(--accent); }
.card-hero-slot { height: 180px; background: rgba(0,0,0,0.2); border-bottom: var(--border); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.card-body { padding: 25px; flex: 1; display: flex; flex-direction: column; }
.card-title { font-size: 1.4rem; font-weight: bold; color: #fff; margin-bottom: 5px; }
.card-desc { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 20px; flex: 1; }
.status-row { margin-top: auto; padding-top: 15px; border-top: 1px solid rgba(255,255,255,0.05); display: flex; justify-content: space-between; align-items: center; }
.ver-tag { font-family: monospace; color: var(--accent); font-size: 0.8rem; }

/* --- DETAIL PAGE --- */
.hero-header-bg { height: 350px; background: #0f1219; position: relative; border-bottom: 1px solid #333; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.hero-content { max-width: 1000px; margin: 0 auto; padding: 40px 30px; display: grid; grid-template-columns: 2fr 1fr; gap: 40px; }
.hero-main h1 { font-size: 3rem; margin: 0; color: #fff; line-height: 1.1; }
.hero-main p { color: #94a3b8; font-size: 1.2rem; line-height: 1.6; margin-top: 15px; }

/* --- BUTTONS --- */
/* Brand Button (Blue) - Adjusted Margin */


/* BRAND ACTION BUTTON (Blue) */
.btn-action-brand { box-sizing: border-box; 
    background: var(--accent);
    color: #0b0d12;
    font-weight: 800;
    text-transform: uppercase;
    /* Reduced vertical padding to 10px to fix height issue */
    padding: 10px 25px; 
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    
    /* Layout: Default to inline for the footer */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    margin: 0;
}

.btn-action-brand:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 0 15px var(--accent-glow);
}

/* Override: Make it full width ONLY in the sidebar widget */
.widget .btn-action-brand { box-sizing: border-box; 
    width: 100%;
    display: flex;
    margin-bottom: 10px; /* Space between buttons */
}

/* Footer Override: Ensure it sticks to the right */
.feat-footer .btn-action-brand { box-sizing: border-box; 
    margin-left: auto;
}
.btn-large { background: var(--accent-red); color: #fff; text-decoration: none; padding: 15px 0; width: 100%; display: block; text-align: center; border-radius: 6px; font-weight: bold; text-transform: uppercase; transition: filter 0.2s; border: none; cursor: pointer; }
/* BRAND ACTION BUTTON (Blue) */
.btn-action-brand { box-sizing: border-box; 
    background: var(--accent);
    color: #0b0d12;
    font-weight: 800;
    text-transform: uppercase;
    /* Reduced vertical padding to 10px to fix height issue */
    padding: 10px 25px; 
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    
    /* Layout: Default to inline for the footer */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    margin: 0;
}

.btn-action-brand:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 0 15px var(--accent-glow);
}

/* Override: Make it full width ONLY in the sidebar widget */
.widget .btn-action-brand { box-sizing: border-box; 
    width: 100%;
    display: flex;
    margin-bottom: 10px; /* Space between buttons */
}

/* Footer Override: Ensure it sticks to the right */
.feat-footer .btn-action-brand { box-sizing: border-box; 
    margin-left: auto;
}
.btn-large:hover { filter: brightness(1.1); }
.btn-secondary { background: transparent; border: 1px solid rgba(255,255,255,0.2); color: #fff; text-decoration: none; padding: 10px 0; width: 100%; display: block; text-align: center; border-radius: 6px; font-weight: bold; text-transform: uppercase; margin-top: 10px; transition: background 0.2s; }
.btn-secondary:hover { background: rgba(255,255,255,0.1); }

/* --- HUB SECTIONS --- */
.hub-section { margin-top: 60px; border-top: 1px solid rgba(255,255,255,0.05); padding-top: 40px; }
.hub-title { font-size: 1.5rem; font-weight: bold; color: #fff; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.hub-title span { color: var(--text-muted); font-size: 0.9rem; font-weight: normal; margin-left: auto; cursor: pointer; }

/* RELATED GRID */
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.mini-card { background: var(--bg-card); border: var(--border); border-radius: 8px; overflow: hidden; transition: all 0.2s; text-decoration: none; display: flex; flex-direction: column; }
.mini-card:hover { transform: translateY(-5px); border-color: var(--accent); }
.mini-hero { height: 120px; background: #000; position: relative; }
.mini-body { padding: 15px; }
.mini-title { color: #fff; font-weight: bold; font-size: 1rem; margin-bottom: 5px; }
.mini-desc { color: var(--text-muted); font-size: 0.8rem; }

/* DISCUSSION FEED */
.discussion-list { display: flex; flex-direction: column; gap: 10px; }
.discussion-item { display: flex; gap: 15px; align-items: center; background: rgba(255,255,255,0.02); border: 1px solid transparent; padding: 15px; border-radius: 6px; transition: all 0.2s; text-decoration: none; }
.discussion-item:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.1); }
.disc-icon { width: 40px; height: 40px; background: rgba(0, 176, 255, 0.1); color: var(--accent); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.disc-icon.bug { background: rgba(255, 71, 87, 0.1); color: var(--accent-red); }
.disc-content { flex: 1; }
.disc-title { color: #fff; font-weight: bold; font-size: 1rem; margin-bottom: 4px; }
.disc-meta { color: #666; font-size: 0.8rem; display: flex; gap: 10px; }
.disc-tag { background: #333; padding: 2px 6px; border-radius: 4px; color: #ccc; font-size: 0.7rem; }

/* --- WIDGETS --- */
.widget { background: var(--bg-card); border: var(--border); border-radius: 8px; padding: 20px; margin-bottom: 20px; }
.widget-title { font-size: 0.9rem; font-weight: bold; color: #fff; text-transform: uppercase; margin-bottom: 15px; border-bottom: 1px solid #333; padding-bottom: 10px; }

/* --- UTILS --- */
.placeholder-border { border: var(--placeholder-border); width: 90%; height: 80%; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-family: monospace; }
img.cover-fit { width: 100%; height: 100%; object-fit: cover; }
.alert-dependency { background: rgba(255, 165, 0, 0.1); border: 1px solid orange; color: orange; padding: 15px; border-radius: 6px; margin-bottom: 20px; }
.alert-dependency a { color: #fff; text-decoration: underline; }

/* HIGH-VIS CLOSE BUTTON */
.close-btn { 
    position: absolute; 
    top: 20px; 
    right: 20px; 
    width: 45px; 
    height: 45px; 
    background: rgba(0, 0, 0, 0.6); 
    border: 2px solid rgba(255, 255, 255, 0.3); 
    color: #fff; 
    border-radius: 50%; 
    cursor: pointer; 
    font-size: 1.8rem; 
    line-height: 1;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s ease; 
    z-index: 500; 
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}
.close-btn:hover { 
    background: var(--accent-red); 
    border-color: var(--accent-red); 
    transform: rotate(90deg) scale(1.1); 
    box-shadow: 0 0 20px rgba(255, 71, 87, 0.6); 
}




/* Make the footer text interact like a link */
a.feat-stat { transition: color 0.2s; }
a.feat-stat:hover { color: var(--accent); }



/* --- TICKET CARD FIXES (Recent Solutions) --- */
.ticket-card {
    display: flex;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    margin-bottom: 8px;
    text-decoration: none;
    transition: all 0.2s;
}
.ticket-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: #66c0f4;
    transform: translateX(4px);
}
.ticket-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 15px;
    object-fit: cover;
    background: #222;
}
.ticket-info {
    flex: 1;
    overflow: hidden;
}
.ticket-title {
    display: block;
    color: #fff;
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 4px;
}
.ticket-desc {
    color: #8b929a;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ticket-meta {
    margin-left: 15px;
    text-align: right;
    font-size: 0.75rem;
    color: #555;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 70px;
}
