/* =============================================================
   AethCore — games.css
   Game catalog grid and screenshot grid.
   ============================================================= */

/* --- Game catalog filter bar --- */

.games-filter {
    padding: 6px 8px;
    background: #efefef;
    border-bottom: 1px solid #d8d8d8;
}

.games-filter-form {
    display: flex;
    align-items: center;
    position: relative;
}

.games-filter-input {
    width: 100%;
    padding: 4px 7px;
    font-size: 12px;
    font-family: inherit;
    border: 1px solid #b0b0b0;
    background: #fff;
    color: #222;
    outline: none;
}

.games-filter-input:focus {
    border-color: #c85000;
}

.games-filter-input::placeholder {
    color: #aaa;
}

.games-filter-clear {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #888;
    text-decoration: none;
    line-height: 1;
}

.games-filter-clear:hover {
    color: #333;
}

/* --- Game catalog grid --- */

.games-grid,
.top-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
}

.game-catalog-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.game-catalog-card:hover .game-catalog-title {
    text-decoration: underline;
}

.game-catalog-cover,
.game-catalog-no-cover {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    display: block;
    border: 1px solid #ccc;
}

.game-catalog-no-cover {
    background: #ddd;
}

.game-catalog-info {
    padding: 4px 2px 2px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.game-catalog-title {
    font-size: 12px;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-catalog-meta {
    font-size: 10px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Game detail page --- */

.game-detail-layout {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.game-detail-cover-col {
    flex-shrink: 0;
}

.game-detail-cover {
    width: 120px;
    height: 160px;
    object-fit: cover;
    display: block;
    border: 1px solid #ccc;
}

.game-detail-no-cover {
    background: #d4d4d4;
}

.game-detail-info-col {
    flex: 1;
    min-width: 0;
}

.game-detail-title {
    font-size: 18px;
    font-weight: bold;
    color: #222;
    margin-bottom: 6px;
    line-height: 1.2;
}

.game-detail-genre {
    display: inline-block;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    background: #e8e8e8;
    border: 1px solid #d0d0d0;
    padding: 2px 7px;
    margin-bottom: 10px;
}

.game-detail-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.game-detail-meta-row {
    display: flex;
    gap: 8px;
    font-size: 12px;
}

.game-detail-meta-label {
    font-weight: bold;
    color: #555;
    width: 72px;
    flex-shrink: 0;
}

.game-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}

.game-tag {
    display: inline-block;
    font-size: 10px;
    padding: 2px 7px;
    background: #e8edf2;
    border: 1px solid #cdd5de;
    border-radius: 3px;
    color: #555;
}

.game-description {
    font-size: 12px;
    line-height: 1.6;
    color: #444;
}

/* --- Game score summary (detail page header) --- */

.game-score-summary {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 8px;
    font-size: 13px;
}

.game-score-num {
    font-weight: bold;
    color: #b8860b;
    font-size: 15px;
}

.game-score-outof {
    color: #888;
}

.game-score-count {
    color: #888;
    font-size: 11px;
}

/* --- Star display (read-only) --- */

.review-stars .star-filled {
    color: #c8900a;
}

.review-stars .star-empty {
    color: #ccc;
}

/* --- Game catalog score badge --- */

.game-catalog-score {
    font-size: 10px;
    color: #c8900a;
    font-weight: bold;
}

/* --- Star picker (interactive) --- */

.star-picker {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 2px;
    margin-bottom: 8px;
}

.star-picker input[type="radio"] {
    display: none;
}

.star-picker label {
    cursor: pointer;
    color: #ccc;
    font-size: 26px;
    line-height: 1;
    transition: color 0.1s;
}

/* CSS-only fallback (no JS) */
.star-picker label:hover,
.star-picker label:hover ~ label {
    color: #c8900a;
}

.star-picker input:checked + label,
.star-picker input:checked + label ~ label {
    color: #c8900a;
}

/* JS-enhanced: full control via .star-on class */
.star-picker.js-enabled label {
    color: #ccc !important;
}

.star-picker.js-enabled label.star-on {
    color: #c8900a !important;
}

/* --- Review form --- */

.review-form-wrap {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e0e0e0;
}

.review-form-header {
    font-size: 12px;
    font-weight: bold;
    color: #555;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.review-body-input {
    width: 100%;
    min-height: 120px;
    font-size: 12px;
    padding: 6px 8px;
    border: 1px solid #ccc;
    resize: vertical;
    box-sizing: border-box;
    font-family: inherit;
    margin-bottom: 8px;
    display: block;
}

/* --- Review list --- */

.review-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.review-item {
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.review-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.review-username {
    font-weight: bold;
    font-size: 12px;
    color: #333;
    text-decoration: none;
}

.review-username:hover {
    text-decoration: underline;
}

.review-date {
    font-size: 11px;
    color: #999;
}

.review-body {
    font-size: 12px;
    color: #444;
    line-height: 1.5;
    margin: 0;
}

.review-delete-form {
    display: inline;
    margin-left: auto;
}

.btn-link {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    text-decoration: underline;
}

.review-delete-btn {
    font-size: 11px;
    color: #aaa;
}

.review-delete-btn:hover {
    color: #c00;
}

/* --- Screenshot carousel (game detail page) --- */

.game-carousel {
    display: flex;
    align-items: center;
    gap: 6px;
}

.carousel-viewport {
    flex: 1;
    overflow: hidden;
    min-width: 0;
}

.carousel-track {
    display: flex;
    gap: 8px;
    transition: transform 0.25s ease;
}

.carousel-slide {
    flex: 0 0 calc(33.333% - 6px);
    min-width: 0;
    text-align: center;
}

.carousel-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border: 1px solid #ccc;
    display: block;
}

.carousel-img:hover {
    opacity: 0.85;
}

.carousel-credit {
    display: block;
    font-size: 10px;
    color: #888;
    margin-top: 3px;
}

.carousel-credit a {
    color: #888;
}

.carousel-credit a:hover {
    color: #c85000;
}

.carousel-btn {
    flex-shrink: 0;
    width: 24px;
    height: 40px;
    background: #eee;
    border: 1px solid #ccc;
    cursor: pointer;
    font-size: 20px;
    line-height: 40px;
    text-align: center;
    color: #555;
    padding: 0;
    user-select: none;
}

.carousel-btn:hover {
    background: #ddd;
    color: #222;
}

/* --- Screenshot detail page --- */

.screenshot-detail {
    text-align: center;
}

.screenshot-detail-img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ccc;
    display: inline-block;
}

.screenshot-detail-meta {
    margin-top: 8px;
    text-align: left;
}

.screenshot-detail-caption {
    font-size: 12px;
    color: #444;
    margin: 0 0 4px;
}

.screenshot-detail-info {
    font-size: 11px;
    color: #888;
    margin: 0;
}

.screenshot-detail-info a {
    color: #888;
}

.screenshot-detail-info a:hover {
    color: #c85000;
}

/* --- Profile review list --- */

.profile-review-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.profile-review-item {
    display: flex;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.profile-review-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.profile-review-cover-link {
    display: block;
    flex-shrink: 0;
    text-decoration: none;
    width: 45px;
}

.profile-review-cover {
    width: 45px;
    height: 60px;
    object-fit: cover;
    border: 1px solid #ccc;
    display: block;
}

.profile-review-game-title {
    display: block;
    font-size: 12px;
    font-weight: bold;
    color: #333;
    text-decoration: none;
    margin-bottom: 4px;
    line-height: 1.3;
}

.profile-review-game-title:hover {
    text-decoration: underline;
    color: #c8530a;
}

.profile-review-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.profile-review-content {
    flex: 1;
    min-width: 0;
    font-size: 12px;
}

/* --- Profile tabs --- */

.profile-tabs-header {
    display: flex;
    gap: 0;
    padding: 0;
    align-items: center;
}

.profile-tabs-header .module-header-link {
    margin-left: auto;
    float: none;
    padding: 5px 8px;
    align-self: center;
}

.profile-tab {
    padding: 6px 16px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #777;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    text-decoration: none;
    font-family: Tahoma, Verdana, Arial, sans-serif;
}

.profile-tab:hover {
    color: #333;
}

.profile-tab.active {
    color: #c85000;
    border-bottom-color: #c85000;
}

/* --- Read more link --- */

.read-more-link {
    display: inline-block;
    margin-top: 4px;
    font-size: 11px;
    color: #c85000;
    text-decoration: none;
}

.read-more-link:hover {
    text-decoration: underline;
}

/* --- Module footer (see all) --- */

.module-footer {
    padding: 8px 12px;
    border-top: 1px solid #ddd;
    text-align: right;
}

.module-footer-link {
    font-size: 12px;
    color: #c85000;
    text-decoration: none;
    font-weight: bold;
}

.module-footer-link:hover {
    text-decoration: underline;
}

/* --- Backlog --- */

.backlog-list {
    display: flex;
    flex-direction: column;
}

.backlog-item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e8e8e8;
}

.backlog-item:last-child {
    border-bottom: none;
}

.backlog-cover-link {
    flex-shrink: 0;
}

.backlog-item-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.backlog-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.backlog-want_to_play {
    background: #e0e8f0;
    color: #3a6a8a;
}

.backlog-playing {
    background: #d8f0d8;
    color: #2a7a2a;
}

.backlog-completed {
    background: #e8e0f0;
    color: #6a3a8a;
}

.backlog-dropped {
    background: #f0e0e0;
    color: #8a3a3a;
}

/* --- Backlog form on game detail --- */

.backlog-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.backlog-form-inline {
    display: flex;
    gap: 8px;
    align-items: center;
}

.backlog-select {
    padding: 4px 8px;
    font-size: 12px;
    border: 1px solid #ccc;
    border-radius: 2px;
    background: #fff;
    font-family: Tahoma, Verdana, Arial, sans-serif;
}

