/**
 * Games Page Styles
 */

.games-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 24px;
    gap: 32px;
    overflow-y: auto;
}

.games-header {
    margin-bottom: 8px;
}

.games-title {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.games-subtitle {
    color: var(--text-muted, #94a3b8);
    font-size: 1.1rem;
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.games-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    gap: 20px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.games-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
}

.games-card:active {
    transform: translateY(0);
}

.games-card-icon {
    font-size: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    flex-shrink: 0;
}

.games-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.games-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.games-card-desc {
    color: var(--text-muted, #94a3b8);
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
}

.games-card-meta {
    display: flex;
    gap: 8px;
    margin-top: auto;
    padding-top: 12px;
}

.games-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.games-badge.version {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.games-badge.status {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

/* Game Player / Terminal */
.games-player {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
}

.games-player-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.games-back-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.games-back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.games-player-title {
    font-size: 1.2rem;
    font-weight: 600;
}

.games-player-version {
    color: var(--text-muted, #94a3b8);
    font-size: 0.9rem;
}

.games-terminal {
    flex: 1;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 20px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.games-terminal-output {
    flex: 1;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #22c55e; /* Matrix Green */
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.terminal-line.terminal-input {
    color: #fff;
    font-weight: 600;
}

.terminal-line.terminal-system {
    color: #94a3b8;
    font-style: italic;
}

.terminal-line.terminal-error {
    color: #ef4444;
}

.games-terminal-input-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.games-prompt {
    color: #22c55e;
    font-weight: bold;
}

.games-terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    padding: 0;
}

.games-terminal-input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

/* Thumbnail placeholder */
.games-card-thumb {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.06);
}
.games-card-thumb .games-card-icon {
    font-size: 2.5rem;
    width: auto;
    height: auto;
    background: none;
    border-radius: 0;
}

/* Loading skeleton */
@keyframes games-shimmer {
    0%   { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}

.games-card-skeleton {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    gap: 20px;
}

.games-card-skeleton .skel-icon,
.games-card-skeleton .skel-title,
.games-card-skeleton .skel-desc,
.games-card-skeleton .skel-badges {
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 100%);
    background-size: 800px 100%;
    animation: games-shimmer 1.5s ease-in-out infinite;
    border-radius: 8px;
}

.games-card-skeleton .skel-icon {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 12px;
}

.games-card-skeleton .skel-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.games-card-skeleton .skel-title {
    height: 20px;
    width: 60%;
}

.games-card-skeleton .skel-desc {
    height: 14px;
    width: 90%;
}

.games-card-skeleton .skel-badges {
    height: 24px;
    width: 40%;
    margin-top: auto;
}

/* Empty/Error States */
.games-empty, .games-error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 64px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: var(--text-muted, #94a3b8);
}

/* Mobile */
@media (max-width: 768px) {
    .games-layout { padding: 12px; gap: 16px; }
    .games-grid { grid-template-columns: 1fr; gap: 12px; }
    .games-card { padding: 16px; }
    .games-terminal { max-height: 50vh; }
    .games-empty, .games-error { padding: 32px 16px; }
}

@media (max-width: 480px) {
    .games-layout { padding: 8px; gap: 12px; }
    .games-card-thumb { width: 60px; height: 60px; }
    .games-card-title { font-size: 1rem; }
}
