/* Game Detail Page Styles */

.game-detail {
    max-width: 900px;
    margin: 0 auto;
    padding: 100px 20px 40px;
}

.back-link {
    display: inline-block;
    color: var(--accent);
    text-decoration: none;
    margin-bottom: 20px;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.back-link:hover {
    color: var(--secondary);
}

.game-header {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.game-icon-large {
    font-size: 5rem;
    line-height: 1;
}

.game-title-section {
    flex: 1;
}

.game-title-section h1 {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.8rem;
    margin: 10px 0;
    background: linear-gradient(135deg, var(--accent), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.game-tagline {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    margin-top: 10px;
}

.game-meta-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 40px;
}

.meta-item {
    text-align: center;
}

.meta-label {
    display: block;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.meta-value {
    font-size: 1rem;
    font-weight: 600;
}

.status-available {
    color: #4ade80;
}

.status-coming {
    color: #fbbf24;
}

.game-section {
    margin-bottom: 40px;
}

.game-section h2 {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.9rem;
    margin-bottom: 20px;
    color: var(--accent);
}

.game-section p {
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
}

/* Workload Tags */
.workload-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.workload-tag {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.workload-tag.rti {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.workload-tag.de {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.workload-tag.ds {
    background: rgba(168, 85, 247, 0.2);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.workload-tag.pbi {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

/* Items Grid */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.item-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    transition: transform 0.3s, border-color 0.3s;
}

.item-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
}

.item-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 8px;
}

.item-name {
    display: block;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 4px;
}

.item-detail {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
}

/* Scenario Tags */
.scenario-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.scenario-tag {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Quick Start */
.quickstart {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1), rgba(0, 212, 255, 0.1));
    padding: 30px;
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 136, 0.2);
}

.code-block {
    background: #1a1a2e;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    overflow-x: auto;
}

.code-block pre {
    margin: 0;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

.code-block code {
    color: #e2e8f0;
}

.code-block .comment {
    color: #6b7280;
}

.code-block .keyword {
    color: #c084fc;
}

.code-block .string {
    color: #4ade80;
}

/* Learn List */
.learn-list, .prereq-list {
    list-style: none;
    padding: 0;
}

.learn-list li, .prereq-list li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 1rem;
    line-height: 1.6;
}

.learn-list li:last-child, .prereq-list li:last-child {
    border-bottom: none;
}

/* Architecture Diagram */
.architecture-diagram {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 20px;
    overflow-x: auto;
}

.architecture-diagram pre {
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.75rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    white-space: pre;
}

/* Mission Phases */
.phases-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.phase {
    display: grid;
    grid-template-columns: 100px 150px 1fr;
    gap: 15px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    align-items: center;
}

.phase-time {
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    color: var(--accent);
}

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

.phase-desc {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* CTA Section */
.cta-section {
    text-align: center;
    padding: 40px 0;
}

.btn-large {
    font-size: 1.1rem;
    padding: 18px 40px;
}

/* Post-Deploy Section */
.post-deploy {
    background: linear-gradient(135deg, rgba(255, 170, 0, 0.1), rgba(255, 107, 107, 0.1));
    padding: 30px;
    border-radius: 12px;
    border: 1px solid rgba(255, 170, 0, 0.2);
}

.step-card {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border-left: 4px solid var(--accent);
}

.step-card:last-child {
    margin-bottom: 0;
}

.step-card .step-number {
    width: 40px;
    height: 40px;
    background: var(--accent);
    color: var(--background);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-pixel);
    font-size: 0.9rem;
    font-weight: bold;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content h4 {
    margin: 0 0 10px 0;
    color: var(--accent);
    font-size: 1.1rem;
}

.step-content p {
    margin: 0 0 10px 0;
    color: rgba(255, 255, 255, 0.85);
}

.step-content ul {
    margin: 10px 0 0 0;
    padding-left: 20px;
}

.step-content li {
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.75);
}

.step-content code {
    background: rgba(0, 255, 136, 0.15);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    color: var(--accent);
}

/* Responsive */
@media (max-width: 768px) {
    .game-header {
        flex-direction: column;
        text-align: center;
    }
    
    .game-title-section h1 {
        font-size: 1.3rem;
    }
    
    .game-meta-bar {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .phase {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .architecture-diagram pre {
        font-size: 0.6rem;
    }
}

/* Championship Edition - Levels Table */
.levels-table {
    overflow-x: auto;
    margin-top: 15px;
}

.levels-table table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    overflow: hidden;
}

.levels-table th,
.levels-table td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.levels-table th {
    background: rgba(0, 255, 136, 0.2);
    color: var(--accent);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.levels-table tr:last-child td {
    border-bottom: none;
}

.levels-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Challenge Section */
.challenge-section {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(249, 115, 22, 0.15));
    padding: 30px;
    border-radius: 12px;
    border: 2px solid rgba(251, 191, 36, 0.4);
    position: relative;
    overflow: hidden;
}

.challenge-section::before {
    content: "🏆";
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 6rem;
    opacity: 0.1;
}

.challenge-section h2 {
    color: #fbbf24 !important;
}

.challenge-box {
    position: relative;
    z-index: 1;
}

.challenge-intro {
    font-size: 1.15rem;
    margin-bottom: 15px;
    color: #fef3c7;
}

.challenge-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.challenge-list li {
    padding: 12px 15px;
    margin-bottom: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border-left: 4px solid #fbbf24;
    color: rgba(255, 255, 255, 0.9);
}

.challenge-hint {
    margin-top: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

/* Scoring Grid */
.scoring-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.scoring-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.scoring-icon {
    font-size: 1.5rem;
}

.levels-table td:first-child {
    color: var(--accent);
    font-weight: bold;
}

/* Scoring Grid */
.scoring-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.scoring-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border-left: 3px solid var(--accent);
}

.scoring-icon {
    font-size: 1.5rem;
}

.scoring-item span:last-child {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
}

/* ===== Feedback + Share (per-game) ===== */
.game-feedback {
    margin-top: 50px;
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.06), rgba(255, 0, 255, 0.06));
}

.game-feedback h2 {
    margin-bottom: 8px;
}

.game-feedback > p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.share-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 26px;
}

.share-label {
    font-family: var(--font-pixel);
    font-size: 0.6rem;
    color: var(--text-muted);
    margin-right: 4px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.35);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.share-btn:hover {
    transform: translateY(-2px);
}

.share-btn.linkedin:hover { border-color: #0a66c2; box-shadow: 0 0 14px rgba(10, 102, 194, 0.6); }
.share-btn.x:hover        { border-color: #fff;     box-shadow: 0 0 14px rgba(255, 255, 255, 0.4); }
.share-btn.reddit:hover   { border-color: #ff4500; box-shadow: 0 0 14px rgba(255, 69, 0, 0.6); }
.share-btn.bug:hover      { border-color: var(--secondary); box-shadow: 0 0 14px rgba(255, 0, 255, 0.6); }

.comments {
    margin-top: 10px;
    min-height: 40px;
}

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

.comments-todo a {
    color: var(--primary);
}
