/* ==========================================================================
   Dlhr - Merged Stylesheet
   Order: Fonts → Reset → Header → Buttons → Main → Page-specific → Footer → Responsive
   ========================================================================== */

/* Inter Font — Self-hosted (latin-ext + latin, variable weight 400–700) */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/inter-v20-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                   U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                   U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/inter-v20-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                   U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                   U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0f0f0f;
    color: #ffffff;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Header */
.header {
    background: #1a1a1a;
    border-bottom: 1px solid #2a2a2a;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.logo {
    font-size: 26px;
    font-weight: 700;
    color: #00d47e;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo span {
    color: #fff;
}

.nav {
    display: flex;
    gap: 8px;
}

.nav a {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    color: #888;
    transition: all 0.2s;
}

.nav a:hover {
    color: #fff;
    background: #2a2a2a;
}

.nav a.active {
    color: #00d47e;
    background: rgba(0, 212, 126, 0.1);
}

.search-box {
    flex: 1;
    max-width: 500px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 12px 20px 12px 50px;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 12px;
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}

.search-box input:focus {
    border-color: #00d47e;
    background: #333;
}

.search-box input::placeholder {
    color: #666;
}

.search-box::before {
    content: "";
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
}

.header-actions {
    display: none;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-size: 14px;
}

.btn-primary {
    background: #00d47e;
    color: #000;
}

.btn-primary:hover {
    background: #00b86b;
}

.btn-secondary {
    background: #2a2a2a;
    color: #fff;
}

.btn-secondary:hover {
    background: #3a3a3a;
}

/* Main Content */
.main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 20px;
}

/* ==========================================================================
   Index Page - Hero Banner
   ========================================================================== */

.hero {
    background: linear-gradient(135deg, #1e3a5f 0%, #0d1b2a 100%);
    border-radius: 20px;
    padding: 50px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.hero::after {
    content: "";
    position: absolute;
    right: -50px;
    top: -50px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0, 212, 126, 0.2) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content {
    max-width: 500px;
    z-index: 1;
}

.hero h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.2;
}

.hero h1 span {
    color: #00d47e;
}

.hero p {
    color: #aaa;
    font-size: 16px;
    margin-bottom: 25px;
    line-height: 1.6;
}

.hero-stats {
    display: flex;
    gap: 40px;
    margin-top: 30px;
}

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

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #00d47e;
}

.stat-label {
    font-size: 13px;
    color: #888;
    margin-top: 5px;
}

.hero-image {
    font-size: 150px;
    z-index: 1;
}

/* ==========================================================================
   Index Page - Categories
   ========================================================================== */

.categories {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.category-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 50px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
}

.category-chip:hover {
    border-color: #00d47e;
    background: rgba(0, 212, 126, 0.1);
}

.category-chip.active {
    background: #00d47e;
    color: #000;
    border-color: #00d47e;
}

.category-icon {
    font-size: 18px;
}

/* ==========================================================================
   Index Page - Sections
   ========================================================================== */

.section {
    margin-bottom: 30px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title .icon {
    font-size: 28px;
}

.view-all {
    color: #00d47e;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.2s;
}

.view-all:hover {
    gap: 10px;
}

/* ==========================================================================
   Index Page - App Grid / App Card
   ========================================================================== */

.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
}

.app-card {
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    border: 1px solid #2a2a2a;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 15px;
}

.app-card:hover {
    transform: translateY(-5px);
    border-color: #3a3a3a;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.app-icon {
    width: 80px;
    height: 80px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    position: relative;
    flex-shrink: 0;
}

.app-icon img {
    width: 100%;
    height: 100%;
    border-radius: 18px;
    object-fit: cover;
}

.app-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #00d47e;
    color: #000;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
}

.app-badge.hot {
    background: #ff4757;
    color: #fff;
}

.app-badge.new {
    background: #3742fa;
    color: #fff;
}

.app-info {
    padding: 10px;
    width: 100%;
    text-align: center;
}

.app-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-developer {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-category {
    font-size: 13px;
    color: #888;
    margin-bottom: 10px;
}

.app-meta {
    display: flex;
    justify-content: center;
    gap: 10px;
    align-items: center;
}

.app-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}

.app-rating .star {
    color: #ffc107;
}

.app-size {
    font-size: 11px;
    color: #666;
}

.app-download-btn {
    width: 100%;
    padding: 8px;
    background: linear-gradient(135deg, #00d47e 0%, #00b86b 100%);
    border: none;
    color: #000;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.app-download-btn:hover {
    filter: brightness(1.1);
}

/* ==========================================================================
   Index Page - Featured Apps Horizontal Scroll
   ========================================================================== */

.featured-scroll {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 15px;
    scroll-snap-type: x mandatory;
}

.featured-card {
    min-width: 350px;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    gap: 16px;
    border: 1px solid #3a3a3a;
    scroll-snap-align: start;
    transition: all 0.3s;
}

.featured-card:hover {
    border-color: #00d47e;
}

.featured-icon {
    width: 90px;
    height: 90px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 45px;
    flex-shrink: 0;
}

.featured-content {
    flex: 1;
    min-width: 0;
}

.featured-name {
    font-weight: 600;
    font-size: 17px;
    margin-bottom: 5px;
}

.featured-developer {
    font-size: 13px;
    color: #888;
    margin-bottom: 8px;
}

.featured-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
}

.featured-meta {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* ==========================================================================
   Index Page - Top Charts
   ========================================================================== */

.chart-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 15px;
}

.chart-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #1a1a1a;
    border-radius: 12px;
    border: 1px solid #2a2a2a;
    transition: all 0.2s;
}

.chart-item:hover {
    background: #222;
    border-color: #3a3a3a;
}

.chart-rank {
    font-size: 20px;
    font-weight: 700;
    color: #00d47e;
    width: 30px;
    text-align: center;
}

.chart-rank.gold { color: #ffd700; }
.chart-rank.silver { color: #c0c0c0; }
.chart-rank.bronze { color: #cd7f32; }

.chart-icon {
    width: 55px;
    height: 55px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.chart-info {
    flex: 1;
    min-width: 0;
}

.chart-name {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
}

.chart-category {
    font-size: 13px;
    color: #666;
}

.chart-download {
    padding: 8px 18px;
    background: #2a2a2a;
    border: none;
    border-radius: 8px;
    color: #00d47e;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.chart-download:hover {
    background: #00d47e;
    color: #000;
}

/* ==========================================================================
   Game Page - Page Header
   ========================================================================== */

.page-header {
    margin-bottom: 20px;
}

.page-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.page-subtitle {
    color: #888;
    font-size: 16px;
}

/* ==========================================================================
   Game Page - Filters
   ========================================================================== */

.filters {
    margin-bottom: 20px;
}

.filter-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-label {
    color: #888;
    font-size: 14px;
    font-weight: 500;
}

.filter-select {
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    padding: 10px 35px 10px 15px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23888' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.filter-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
}

.filter-tag {
    padding: 8px 16px;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-tag:hover {
    border-color: #00d47e;
}

.filter-tag.active {
    background: #00d47e;
    color: #000;
    border-color: #00d47e;
}

/* Results Info */
.results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.results-count {
    color: #888;
    font-size: 14px;
}

.sort-select {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 8px 30px 8px 12px;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23888' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

/* ==========================================================================
   Game Page - Game Grid / Game Card
   ========================================================================== */

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.game-card {
    background: #1a1a1a;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #2a2a2a;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 15px;
}

.game-card:hover {
    transform: translateY(-5px);
    border-color: #3a3a3a;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.game-icon {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    position: relative;
    flex-shrink: 0;
}

.game-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #ff4757;
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

.game-badge.mod { background: #00d47e; color: #000; }
.game-badge.new { background: #3742fa; }

.game-info {
    padding: 16px;
    width: 100%;
    text-align: center;
}

.game-name {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-developer {
    font-size: 13px;
    color: #888;
    margin-bottom: 10px;
}

.game-meta {
    display: flex;
    justify-content: center;
    gap: 15px;
    align-items: center;
    margin-bottom: 12px;
}

.game-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
}

.star { color: #ffc107; }

.game-size {
    font-size: 12px;
    color: #666;
}

.game-tags {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
    margin-bottom: 12px;
    justify-content: center;
    overflow: hidden;
}

.game-tag {
    font-size: 11px;
    padding: 4px 8px;
    background: #2a2a2a;
    border-radius: 4px;
    color: #888;
    white-space: nowrap;
}

.download-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #00d47e, #00b86b);
    border: none;
    color: #000;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.download-btn:hover {
    filter: brightness(1.1);
}

/* ==========================================================================
   Game Page - Pagination
   ========================================================================== */

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.page-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    color: #fff;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.page-btn:hover {
    background: #2a2a2a;
}

.page-btn.active {
    background: #00d47e;
    color: #000;
    border-color: #00d47e;
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==========================================================================
   Detail Page - Breadcrumb
   ========================================================================== */

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    color: #888;
    font-size: 14px;
    margin-bottom: 20px;
}

.breadcrumb a:hover {
    color: #00d47e;
}

.breadcrumb span {
    color: #444;
}

/* ==========================================================================
   Detail Page - App Header
   ========================================================================== */

.app-header {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.app-icon-large {
    width: 160px;
    height: 160px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    flex-shrink: 0;
}

.app-header-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.app-title {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 10px;
}

.app-subtitle {
    font-size: 18px;
    color: #00d47e;
    margin-bottom: 20px;
}

.app-meta-tags {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.tag {
    padding: 6px 12px;
    background: #2a2a2a;
    border-radius: 6px;
    font-size: 13px;
    color: #aaa;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tag.rating {
    color: #ffc107;
    background: rgba(255, 193, 7, 0.1);
}

.download-actions {
    display: flex;
    gap: 20px;
    align-items: center;
}

.btn-download-lg {
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #00d47e;
    color: #000;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 250px;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.btn-download-lg:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 212, 126, 0.2);
}

.btn-download-lg:active {
    transform: translateY(0);
}

/* Download Progress */
.btn-download-lg.downloading {
    background: #2a2a2a;
    color: #fff;
    cursor: not-allowed;
    pointer-events: none;
}

.progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: #00d47e;
    width: 0%;
    transition: width 0.1s linear;
}

/* ==========================================================================
   Detail Page - Content Grid
   ========================================================================== */

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: start;
}

.left-col,
.right-col {
    min-width: 0;
}

/* ==========================================================================
   Detail Page - Screenshots
   ========================================================================== */

.detail-screenshots-wrap {
    min-width: 0;
}

.detail-screenshots-heading {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 14px;
}

.screenshots-container {
    margin-bottom: 30px;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 15px;
}

.screenshot {
    height: 180px;
    width: auto;
    background: #2a2a2a;
    display: inline-block;
    margin-right: 15px;
    border-radius: 10px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s;
}

.screenshot:hover {
    transform: scale(1.02);
}

/* ==========================================================================
   Detail Page - Description
   ========================================================================== */

.description-box {
    background: #1a1a1a;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 20px;
    border: 1px solid #2a2a2a;
    min-width: 0;
}

.description-box .section-title {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #2a2a2a;
    font-size: 20px;
}

.text-content {
    color: #ccc;
    line-height: 1.8;
    font-size: 16px;
    word-break: break-word;
    overflow-wrap: break-word;
}

.text-content p {
    margin-bottom: 15px;
}

.text-content h1,
.text-content h2,
.text-content h3,
.text-content h4,
.text-content h5,
.text-content h6 {
    font-weight: 700;
    color: #ffffff;
    line-height: 1.4;
    margin-top: 24px;
    margin-bottom: 12px;
}

.text-content h1:first-child,
.text-content h2:first-child,
.text-content h3:first-child,
.text-content h4:first-child {
    margin-top: 0;
}

.text-content h2 { font-size: 20px; }
.text-content h3 { font-size: 17px; }
.text-content h4 { font-size: 15px; }

.text-content ul,
.text-content ol {
    padding-left: 24px;
    margin-bottom: 15px;
}

.text-content ul { list-style-type: disc; }
.text-content ol { list-style-type: decimal; }

.text-content li {
    margin-bottom: 6px;
    line-height: 1.7;
}

.text-content strong,
.text-content b {
    font-weight: 700;
    color: #e8e8e8;
}

.text-content em,
.text-content i {
    font-style: italic;
}

.text-content a {
    color: #00d47e;
}

.text-content a:hover {
    color: #00b86b;
    text-decoration: underline;
}

.text-content blockquote {
    border-left: 3px solid #00d47e;
    padding-left: 16px;
    margin: 15px 0;
    color: #888;
}

.text-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 10px 0;
}

/* ==========================================================================
   Detail Page - Comments
   ========================================================================== */

.comments-section {
    background: #1a1a1a;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 20px;
    border: 1px solid #2a2a2a;
    min-width: 0;
}

.comment-form {
    margin-bottom: 30px;
}

.comment-input {
    width: 100%;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 12px;
    padding: 15px;
    color: #fff;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    margin-bottom: 15px;
    outline: none;
}

.comment-input:focus {
    border-color: #00d47e;
}

.comment-submit {
    float: right;
    padding: 10px 25px;
    background: #00d47e;
    color: #000;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.comment-submit:hover {
    background: #00b86b;
}

.comment-form::after {
    content: "";
    display: table;
    clear: both;
}

.comment-item {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    border-bottom: 1px solid #2a2a2a;
    padding-bottom: 25px;
}

.comment-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #333;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.comment-user {
    font-weight: 600;
    color: #fff;
    margin-bottom: 5px;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-rating {
    font-size: 12px;
    color: #ffc107;
    background: rgba(255, 193, 7, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.comment-text {
    color: #ccc;
    font-size: 14px;
    line-height: 1.5;
}

/* ==========================================================================
   Detail Page - Info Table
   ========================================================================== */

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

.info-table td {
    padding: 15px 0;
    border-bottom: 1px solid #2a2a2a;
    color: #ccc;
}

.info-table td:first-child {
    width: 150px;
    color: #888;
    font-weight: 500;
}

.info-table a {
    color: #00d47e;
    font-weight: 500;
    transition: color 0.2s;
}

.info-table a:hover {
    color: #00b86b;
    text-decoration: underline;
}

/* ==========================================================================
   Detail Page - Lightbox
   ========================================================================== */

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox img {
    max-width: 85%;
    max-height: 85%;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    user-select: none;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    z-index: 1001;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 50px;
    cursor: pointer;
    z-index: 1001;
    padding: 20px;
    opacity: 0.7;
    transition: all 0.2s;
    user-select: none;
    background: rgba(0,0,0,0.3);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-nav:hover {
    opacity: 1;
    background: rgba(0,0,0,0.6);
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

/* ==========================================================================
   Detail Page - Sidebar
   ========================================================================== */

.sidebar-card {
    background: #1a1a1a;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 20px;
    border: 1px solid #2a2a2a;
    min-width: 0;
}

.sidebar-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #2a2a2a;
}

.similar-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
    min-width: 0;
}

.similar-icon {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 12px;
    background: #2a2a2a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
}

.similar-info {
    flex: 1;
    min-width: 0;
}

.similar-info h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.similar-info p {
    font-size: 13px;
    color: #888;
}

.similar-btn {
    flex-shrink: 0;
    margin-left: auto;
    padding: 8px 15px;
    background: #2a2a2a;
    border-radius: 8px;
    color: #00d47e;
    font-size: 13px;
    font-weight: 600;
}

.similar-btn:hover {
    background: #00d47e;
    color: #000;
}

/* ==========================================================================
   Developer Page - Dev Header
   ========================================================================== */

.dev-header {
    background: linear-gradient(135deg, #1e3a5f 0%, #0d1b2a 100%);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    display: flex;
    gap: 30px;
    align-items: center;
    flex-wrap: wrap;
}

.dev-avatar {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
}

.dev-info {
    flex: 1;
    min-width: 250px;
}

.dev-name {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.dev-verified {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 212, 126, 0.2);
    color: #00d47e;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 15px;
}

.dev-desc {
    color: #aaa;
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    overflow-wrap: break-word;
}

.dev-stats {
    display: flex;
    gap: 40px;
}

.stat {
    text-align: center;
}

.dev-links {
    display: flex;
    gap: 12px;
}

.dev-link {
    padding: 12px 24px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.2s;
}

.dev-link:hover {
    background: rgba(255,255,255,0.2);
}

/* ==========================================================================
   Developer Page - App Grid Override (wider cards, left-aligned)
   ========================================================================== */

.dev-header ~ .section .app-grid {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 20px;
}

.dev-header ~ .section .app-card {
    border-radius: 16px;
    padding-top: 20px;
}

.dev-header ~ .section .app-info {
    padding: 16px;
    text-align: left;
}

.dev-header ~ .section .app-name {
    font-size: 16px;
    margin-bottom: 6px;
}

.dev-header ~ .section .app-meta {
    justify-content: space-between;
}

/* ==========================================================================
   Developer Page - Tabs
   ========================================================================== */

.tabs {
    display: flex;
    gap: 10px;
}

.tab {
    padding: 8px 20px;
    background: #2a2a2a;
    border: none;
    border-radius: 8px;
    color: #888;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.tab:hover {
    color: #fff;
}

.tab.active {
    background: #00d47e;
    color: #000;
}

/* ==========================================================================
   Search Page - Search Info
   ========================================================================== */

.search-info {
    margin-bottom: 30px;
}

.search-query {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
}

.search-query span {
    color: #00d47e;
}

.search-meta {
    color: #888;
}

/* ==========================================================================
   Search Page - Filter Buttons
   ========================================================================== */

.filter-btn {
    padding: 10px 20px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    color: #888;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: #3a3a3a;
    color: #fff;
}

.filter-btn.active {
    background: #00d47e;
    color: #000;
    border-color: #00d47e;
}

/* ==========================================================================
   Search Page - Results / Result Card
   ========================================================================== */

.results {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.result-card {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 16px;
    transition: all 0.2s;
}

.result-card:hover {
    background: #222;
    border-color: #3a3a3a;
}

.result-icon {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    flex-shrink: 0;
    background: #1a1a1a;
}

.result-info {
    flex: 1;
    min-width: 0;
}

.result-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.result-developer {
    color: #00d47e;
    font-size: 14px;
    margin-bottom: 8px;
}

.result-desc {
    color: #888;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.result-meta {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: #666;
}

.result-actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.btn-download {
    padding: 12px 30px;
    background: linear-gradient(135deg, #00d47e, #00b86b);
    border: none;
    border-radius: 10px;
    color: #000;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.btn-download:hover {
    filter: brightness(1.1);
}

/* ==========================================================================
   Search Page - Load More
   ========================================================================== */

.load-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 32px;
}

.btn-load-more {
    padding: 14px 48px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-load-more:hover {
    background: #2a2a2a;
    border-color: #3a3a3a;
}

.btn-load-more:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ==========================================================================
   Search Page - No Results
   ========================================================================== */

.no-results {
    text-align: center;
    padding: 80px 20px;
}

.no-results-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.no-results-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
}

.no-results-desc {
    color: #888;
    margin-bottom: 30px;
}

.suggestion-tags {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.suggestion-tag {
    padding: 10px 20px;
    background: #2a2a2a;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.suggestion-tag:hover {
    background: #00d47e;
    color: #000;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
    background: #111827;
    border-top: 1px solid #2a2a2a;
    padding: 40px 20px 30px;
    margin-top: 30px;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.footer-brand .logo {
    margin-bottom: 15px;
}

.footer-brand p {
    color: #666;
    font-size: 14px;
    line-height: 1.7;
    max-width: 300px;
}

.footer-section h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #fff;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #666;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #00d47e;
}

.footer-bottom {
    border-top: 1px solid #2a2a2a;
    padding-top: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #666;
    font-size: 14px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: #2a2a2a;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s;
}

.social-links a:hover {
    background: #00d47e;
}

/* ==========================================================================
   Responsive - 1024px
   ========================================================================== */

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================================================
   Responsive - 768px
   ========================================================================== */

@media (max-width: 768px) {
    /* Header */
    .header-container {
        flex-wrap: wrap;
        height: auto;
        padding: 15px 20px;
        gap: 15px;
    }

    .nav {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .search-box {
        order: 2;
        max-width: none;
    }

    .header-actions {
        display: none;
    }

    /* Main */
    .main {
        padding: 20px 15px;
    }

    /* Index - Hero */
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
    }

    .hero h1 {
        font-size: 28px;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-image {
        font-size: 80px;
    }

    /* Index - Sections */
    .section {
        margin-bottom: 20px;
    }

    .section-title {
        font-size: 18px;
    }

    .app-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Game Page */
    .page-header {
        margin-bottom: 20px;
    }

    .filters {
        margin-bottom: 20px;
    }

    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .game-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .game-card {
        flex-direction: row;
        align-items: center;
        padding: 15px;
        text-align: left;
        gap: 15px;
    }

    .game-icon {
        margin-bottom: 0;
        width: 72px;
        height: 72px;
    }

    .game-info {
        padding: 0;
        flex: 1;
        min-width: 0;
        text-align: left;
    }

    .game-name {
        margin-bottom: 4px;
        font-size: 16px;
    }

    .game-developer {
        margin-bottom: 6px;
    }

    .game-tags {
        display: flex;
        justify-content: flex-start;
        margin-bottom: 6px;
    }

    .download-btn {
        display: none;
    }

    .game-meta {
        justify-content: flex-start;
        gap: 15px;
    }

    /* Detail Page */
    .app-header {
        flex-direction: row;
        flex-wrap: wrap;
        text-align: left;
        gap: 15px;
        margin-bottom: 20px;
        align-items: flex-start;
    }

    .app-icon-large {
        width: 84px;
        height: 84px;
        font-size: 36px;
        border-radius: 18px;
        margin: 0;
        box-shadow: none;
    }

    .app-header-info {
        flex: 1;
        min-width: 0;
        display: block;
    }

    .app-title {
        font-size: 20px;
        margin-bottom: 4px;
        line-height: 1.3;
    }

    .app-subtitle {
        font-size: 13px;
        margin-bottom: 8px;
    }

    .app-meta-tags {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin-bottom: 8px;
    }

    .app-meta-tags .tag {
        font-size: 11px;
        padding: 4px 8px;
    }

    .download-actions {
        width: 100%;
        margin-top: 8px;
        flex-direction: column;
    }

    .btn-download-lg {
        width: 100%;
        padding: 13px;
        font-size: 16px;
        min-width: 0;
        border-radius: 10px;
    }

    .content-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .left-col, .right-col {
        display: contents;
    }

    .comments-section {
        order: 10;
    }

    .screenshots-container,
    .description-box,
    .comments-section,
    .sidebar-card {
        margin-bottom: 0;
    }

    .screenshot {
        height: 160px;
    }

    .screenshots-container {
        min-width: 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .screenshots-container::-webkit-scrollbar {
        display: none;
    }

    .description-box {
        padding: 16px;
    }

    .sidebar-card {
        padding: 16px;
    }

    .sidebar-title {
        font-size: 15px;
        margin-bottom: 14px;
        padding-bottom: 12px;
    }

    .info-table td {
        font-size: 13px;
        padding: 10px 0;
        word-break: break-all;
        overflow-wrap: break-word;
    }

    .info-table td:first-child {
        width: 84px;
        font-size: 12px;
        word-break: normal;
    }

    .comments-section {
        padding: 16px;
    }

    .comment-form {
        margin-bottom: 16px;
    }

    .comment-input {
        min-height: 80px;
        font-size: 14px;
    }

    .detail-screenshots-heading {
        font-size: 16px;
        font-weight: 700;
        color: #fff;
        margin-bottom: 10px;
    }

    /* Developer Page */
    .dev-header {
        flex-direction: column;
        text-align: center;
        margin-bottom: 20px;
        padding: 20px;
        gap: 20px;
    }

    .dev-avatar {
        width: 80px;
        height: 80px;
        font-size: 32px;
        margin: 0 auto;
    }

    .dev-name {
        font-size: 24px;
    }

    .dev-stats {
        justify-content: center;
        gap: 20px;
    }

    .stat-value {
        font-size: 20px;
    }

    .dev-links {
        justify-content: center;
    }

    .dev-header ~ .section .app-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Developer - Section Header */
    .section-header {
        gap: 10px;
        flex-wrap: nowrap;
    }

    .tabs {
        gap: 5px;
    }

    .tab {
        padding: 6px 12px;
        font-size: 12px;
    }

    /* Search Page */
    .search-info {
        margin-bottom: 20px;
    }

    .result-card {
        flex-direction: row;
        align-items: center;
        padding: 15px;
        gap: 15px;
    }

    .result-icon {
        width: 72px;
        height: 72px;
        font-size: 32px;
        flex-shrink: 0;
    }

    .result-info {
        text-align: left;
    }

    .result-name {
        font-size: 16px;
        margin-bottom: 4px;
    }

    .result-desc {
        display: none;
    }

    .result-meta {
        flex-wrap: nowrap;
        gap: 8px;
        font-size: 12px;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        min-width: 0;
    }

    .result-meta span {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .result-actions {
        display: none;
    }

    /* Footer */
    .footer {
        padding: 40px 20px 30px;
        margin-top: 20px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        text-align: center;
        gap: 30px 20px;
    }

    .footer-brand {
        grid-column: 1 / -1;
        margin-bottom: 10px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-brand p {
        max-width: none;
        margin-top: 10px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        padding-top: 30px;
        align-items: center;
        text-align: center;
    }
}

/* Toast notification */
.toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    color: #fff;
    border: 1px solid #3a3a3a;
    border-left: 4px solid #00d47e;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 14px;
    z-index: 9999;
    white-space: nowrap;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    transition: opacity 0.3s ease;
}
.toast.opacity-0 {
    opacity: 0;
    pointer-events: none;
}
.toast.toast-error {
    border-left-color: #ff4d4d;
}
