/* ==========================================================================
   WinVearn Hub CSS (Developer Game Listings)
   ========================================================================== */

/* Variables (Inherits from main theme where possible) */
:root {
    --hub-primary: #455da7;
    --hub-primary-hover: #5974c9;
    --hub-bg: #ffffff;
    --hub-bg-sec: #f5f5f5;
    --hub-card-bg: #ffffff;
    --hub-text: #333333;
    --hub-text-sec: #666666;
    --hub-border: #e0e0e0;
    --hub-accent: #0ECB81;
    --hub-danger: #F6465D;
    --hub-glass-bg: rgba(255, 255, 255, 0.85);
}

[data-theme="dark"] {
    --hub-bg: #121212;
    --hub-bg-sec: #1e1e1e;
    --hub-card-bg: #252525;
    --hub-text: #ffffff;
    --hub-text-sec: #aaaaaa;
    --hub-border: #333333;
    --hub-glass-bg: rgba(30, 30, 30, 0.85);
}

/* Base resets for hub pages */
body.hub-page {
    background-color: var(--hub-bg);
    color: var(--hub-text);
    font-family: 'IBM Plex Sans', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.hub-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header/Nav */
.hub-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: var(--hub-card-bg);
    border-bottom: 1px solid var(--hub-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.hub-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--hub-text);
    font-weight: 700;
    font-size: 1.2rem;
}

.hub-logo img {
    height: 32px;
}

.hub-nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.hub-nav a {
    color: var(--hub-text-sec);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

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

.hub-btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-family: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.hub-btn-primary {
    background: var(--hub-primary);
    color: white;
}

.hub-btn-primary:hover {
    background: var(--hub-primary-hover);
    transform: translateY(-2px);
}

.hub-btn-outline {
    background: transparent;
    border: 1px solid var(--hub-border);
    color: var(--hub-text);
}

.hub-btn-outline:hover {
    border-color: var(--hub-primary);
    color: var(--hub-primary);
}

.hub-btn-danger {
    background: rgba(246, 70, 93, 0.1);
    color: var(--hub-danger);
    border: 1px solid rgba(246, 70, 93, 0.2);
}

.hub-btn-danger:hover {
    background: var(--hub-danger);
    color: white;
}

/* Auth Page */
.hub-auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 80px);
}

.hub-auth-card {
    background: var(--hub-card-bg);
    border: 1px solid var(--hub-border);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.hub-form-group {
    margin-bottom: 20px;
}

.hub-form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--hub-text);
}

.hub-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--hub-border);
    border-radius: 8px;
    background: var(--hub-bg);
    color: var(--hub-text);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

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

textarea.hub-input {
    resize: vertical;
    min-height: 100px;
}

/* Explore Page (Game Discovery) */
.hub-filters {
    background: var(--hub-card-bg);
    border: 1px solid var(--hub-border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.hub-search-bar {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.hub-search-bar i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--hub-text-sec);
}

.hub-search-bar input {
    padding-left: 40px;
}

.hub-chip-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.hub-chip {
    padding: 6px 14px;
    background: var(--hub-bg-sec);
    border: 1px solid var(--hub-border);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--hub-text-sec);
    cursor: pointer;
    transition: all 0.2s;
}

.hub-chip:hover, .hub-chip.active {
    background: var(--hub-primary);
    color: white;
    border-color: var(--hub-primary);
}

/* Game Cards Grid */
.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.hub-game-card {
    background: var(--hub-card-bg);
    border: 1px solid var(--hub-border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.hub-game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-color: var(--hub-primary);
}

.hub-card-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: var(--hub-bg-sec);
}

.hub-card-content {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.hub-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--hub-text);
}

.hub-card-dev {
    font-size: 0.8rem;
    color: var(--hub-text-sec);
    margin-bottom: 10px;
}

.hub-card-desc {
    font-size: 0.9rem;
    color: var(--hub-text-sec);
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.hub-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid var(--hub-border);
}

.hub-card-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #ffb800;
    font-size: 0.9rem;
    font-weight: 600;
}

.hub-card-rating span {
    color: var(--hub-text-sec);
    font-weight: normal;
    font-size: 0.8rem;
}

.hub-card-platforms {
    display: flex;
    gap: 8px;
    color: var(--hub-text-sec);
}

/* Studio Panel */
.hub-studio-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    margin-top: 20px;
}

.hub-sidebar {
    background: var(--hub-card-bg);
    border: 1px solid var(--hub-border);
    border-radius: 12px;
    padding: 20px 0;
    height: fit-content;
}

.hub-sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 25px;
    color: var(--hub-text-sec);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.hub-sidebar-item:hover, .hub-sidebar-item.active {
    background: var(--hub-primary-hover);
    color: white;
    border-left: 4px solid var(--hub-primary);
}

.hub-panel-content {
    background: var(--hub-card-bg);
    border: 1px solid var(--hub-border);
    border-radius: 12px;
    padding: 30px;
}

.hub-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--hub-border);
}

/* Dashboard Stats */
.hub-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.hub-stat-card {
    background: var(--hub-bg-sec);
    border: 1px solid var(--hub-border);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

.hub-stat-card i {
    font-size: 2rem;
    color: var(--hub-primary);
    margin-bottom: 10px;
}

.hub-stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--hub-text);
    margin-bottom: 5px;
}

.hub-stat-label {
    font-size: 0.9rem;
    color: var(--hub-text-sec);
}

/* Listings Table */
.hub-table-wrapper {
    overflow-x: auto;
}

.hub-table {
    width: 100%;
    border-collapse: collapse;
}

.hub-table th, .hub-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--hub-border);
}

.hub-table th {
    font-weight: 600;
    color: var(--hub-text-sec);
    font-size: 0.9rem;
    text-transform: uppercase;
}

.hub-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.hub-status.approved { background: rgba(14, 203, 129, 0.1); color: var(--hub-accent); }
.hub-status.pending { background: rgba(255, 184, 0, 0.1); color: #ffb800; }
.hub-status.rejected { background: rgba(246, 70, 93, 0.1); color: var(--hub-danger); }

/* Modal */
.hub-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    backdrop-filter: blur(5px);
}

.hub-modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.hub-modal {
    background: var(--hub-card-bg);
    border: 1px solid var(--hub-border);
    border-radius: 16px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.3s;
    position: relative;
}

.hub-modal-overlay.active .hub-modal {
    transform: translateY(0);
}

.hub-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--hub-bg-sec);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--hub-text);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.hub-modal-close:hover {
    background: var(--hub-primary);
    color: white;
}

/* Game Detail within Modal */
.hub-detail-hero {
    height: 300px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.hub-detail-hero::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 150px;
    background: linear-gradient(to top, var(--hub-card-bg), transparent);
}

.hub-detail-content {
    padding: 30px;
    position: relative;
    margin-top: -80px;
    z-index: 2;
}

.hub-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 20px;
}

.hub-detail-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: var(--hub-text);
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.hub-detail-tags {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.hub-detail-desc {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--hub-text-sec);
    margin-bottom: 30px;
}

.hub-screenshots {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 15px;
    margin-bottom: 30px;
}

.hub-screenshots img {
    height: 150px;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
    border: 1px solid var(--hub-border);
}

/* Reviews Section */
.hub-reviews-section {
    border-top: 1px solid var(--hub-border);
    padding-top: 30px;
}

.hub-review-card {
    background: var(--hub-bg-sec);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.hub-review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.hub-review-user {
    font-weight: 600;
    color: var(--hub-text);
}

.hub-review-stars {
    color: #ffb800;
}

.hub-review-text {
    color: var(--hub-text-sec);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Add Review Form */
.hub-add-review {
    background: var(--hub-bg-sec);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    border: 1px solid var(--hub-border);
}

.hub-star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 5px;
    margin-bottom: 15px;
}

.hub-star-rating input {
    display: none;
}

.hub-star-rating label {
    font-size: 1.5rem;
    color: var(--hub-border);
    cursor: pointer;
    transition: color 0.2s;
}

.hub-star-rating label:hover,
.hub-star-rating label:hover ~ label,
.hub-star-rating input:checked ~ label {
    color: #ffb800;
}

/* Responsive */
@media (max-width: 768px) {
    .hub-studio-layout {
        grid-template-columns: 1fr;
    }
    
    .hub-detail-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .hub-detail-title {
        font-size: 1.8rem;
    }
}
