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

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-card: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --accent-color: #3b82f6;
    --accent-hover: #2563eb;
    --accent-light: #eff6ff;
    --danger-color: #ef4444;
    --danger-bg: #fef2f2;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
}

[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --border-color: #334155;
    --accent-light: #1e3a5f;
    --danger-bg: #450a0a;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s, color 0.3s;
}

.hidden {
    display: none !important;
}

/* Header */
header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.3s, border-color 0.3s;
}

.header-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0.875rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.back-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--accent-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.logo:hover {
    color: var(--accent-color);
}

.logo-img {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

nav {
    display: flex;
    gap: 0.5rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.nav-link.active {
    color: #ffffff;
    background: var(--accent-color);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.control-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.control-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-color);
}

/* Main */
main {
    flex: 1;
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}

/* About Page */
.about-hero {
    text-align: center;
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.about-avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 3px solid var(--accent-color);
}

.about-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.studio-logo {
    margin: 1.5rem 0;
    text-align: center;
}

.studio-logo img {
    max-width: 100%;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.about-name {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--text-primary), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-role {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

.about-content {
    max-width: 700px;
    margin: 0 auto;
}

.about-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.3s, border-color 0.3s;
}

.about-section h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.about-section p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Sections */
section {
    margin-bottom: 3rem;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-primary);
}

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

/* Project List */
.project-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.project-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.2s;
}

.project-item:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.project-link {
    width: 100%;
    text-align: left;
    padding: 1rem 1.25rem;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: background 0.2s;
}

.project-link:hover {
    background: var(--bg-secondary);
}

.project-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.age-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.age-badge.adult {
    background: #fef2f2;
    color: #dc2626;
}

[data-theme="dark"] .age-badge.adult {
    background: #7f1d1d;
    color: #fca5a5;
}

.age-badge.extreme {
    background: #fecaca;
    color: #991b1b;
}

[data-theme="dark"] .age-badge.extreme {
    background: #450a0a;
    color: #ffffff;
}

/* Platform icons */
.platform-icons {
    display: flex;
    gap: 0.375rem;
    margin-left: 0.5rem;
}

.platform-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: 4px;
    padding: 3px;
}

.platform-icon svg {
    width: 100%;
    height: 100%;
}

.platform-icon.windows svg {
    fill: #0078d4;
}

.platform-icon.linux svg {
    fill: #f5a623;
}

.platform-icon.android svg {
    fill: #3ddc84;
}

/* Category/Genre badges */
.category-badge {
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    background: var(--accent-light);
    color: var(--accent-color);
    margin-left: 0.5rem;
}

/* Category/Genre list */
.category-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.2s;
}

.category-item:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.category-link {
    width: 100%;
    text-align: left;
    padding: 1rem 1.25rem;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: background 0.2s;
}

.category-link:hover {
    background: var(--bg-secondary);
}

.category-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-count {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
}

/* Back to list button */
.back-to-top-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.625rem 1rem;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.back-to-top-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--accent-color);
}

/* Detail buttons container */
.detail-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.arrow {
    color: var(--text-muted);
    font-size: 1.25rem;
    transition: transform 0.2s;
}

.project-item:hover .arrow {
    transform: translateX(4px);
    color: var(--accent-color);
}

/* Detail Page */
.detail-page {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.detail-header {
    margin-bottom: 2rem;
}

.detail-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Steam-style Media Gallery */
.steam-gallery {
    margin-bottom: 1.5rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.steam-gallery-main {
    width: 100%;
    aspect-ratio: 16/9;
    position: relative;
    background: #000;
    overflow: hidden;
}

.steam-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: pointer;
    transition: opacity 0.3s;
}

.steam-gallery-main iframe {
    width: 100%;
    height: 100%;
    display: block;
}

.steam-gallery-main .gallery-open-hint {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.steam-gallery-main:hover .gallery-open-hint {
    opacity: 1;
}

.steam-gallery-thumbs {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem;
    overflow-x: auto;
    background: var(--bg-tertiary);
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.steam-gallery-thumbs::-webkit-scrollbar {
    height: 6px;
}

.steam-gallery-thumbs::-webkit-scrollbar-track {
    background: transparent;
}

.steam-gallery-thumbs::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.steam-thumb {
    flex-shrink: 0;
    width: 120px;
    height: 68px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    position: relative;
    background: #000;
}

.steam-thumb:hover {
    border-color: var(--text-muted);
}

.steam-thumb.active {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

.steam-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.steam-thumb.video-thumb::after {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    padding-left: 2px;
}

.steam-thumb.video-thumb:hover::after {
    background: var(--accent-color);
}

/* Legacy video container for blog */
.video-container {
    margin-bottom: 1.5rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.video-container iframe {
    width: 100%;
    aspect-ratio: 16/9;
    display: block;
}

/* Screenshots Gallery (legacy for blog) */
.screenshots-gallery {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 1rem 0;
    margin-bottom: 1.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.screenshots-gallery::-webkit-scrollbar {
    height: 6px;
}

.screenshots-gallery::-webkit-scrollbar-track {
    background: transparent;
}

.screenshots-gallery::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.screenshots-gallery img {
    height: 220px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.screenshots-gallery img:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

.detail-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.9;
}

/* Markdown Content */
.markdown-content {
    color: var(--text-secondary);
    line-height: 1.8;
}

.markdown-content h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 1.5rem 0 1rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.markdown-content h2 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1.25rem 0 0.75rem;
}

.markdown-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1rem 0 0.5rem;
}

.markdown-content p {
    margin: 0.75rem 0;
}

.markdown-content strong {
    font-weight: 600;
    color: var(--text-primary);
}

.markdown-content em {
    font-style: italic;
}

.markdown-content a {
    color: var(--accent-color);
    text-decoration: none;
}

.markdown-content a:hover {
    text-decoration: underline;
}

.markdown-content ul, .markdown-content ol {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
}

.markdown-content li {
    margin: 0.25rem 0;
}

.markdown-content code {
    background: var(--bg-tertiary);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9em;
}

.markdown-content pre {
    background: var(--bg-tertiary);
    padding: 1rem;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 1rem 0;
    border: 1px solid var(--border-color);
}

.markdown-content pre code {
    background: none;
    padding: 0;
}

.markdown-content blockquote {
    border-left: 4px solid var(--accent-color);
    padding-left: 1rem;
    margin: 1rem 0;
    color: var(--text-muted);
    font-style: italic;
}

.markdown-content img {
    max-width: 100%;
    border-radius: var(--radius-md);
    margin: 1rem 0;
}

.detail-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.875rem 1.75rem;
    background: var(--accent-color);
    color: #fff;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.2s;
    box-shadow: var(--shadow-md);
}

.detail-link:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Downloads Section */
.downloads-section {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.downloads-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.downloads-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s;
    border: 1px solid var(--border-color);
}

.download-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--accent-color);
    transform: translateY(-1px);
}

.download-btn svg {
    width: 18px;
    height: 18px;
}

.download-btn.windows svg {
    fill: #0078d4;
}

.download-btn.linux svg {
    fill: #f5a623;
}

.download-btn.android svg {
    fill: #3ddc84;
}

/* Multiple Links */
.links-section {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Multiple Videos */
.videos-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Blur for 18+/21+ content */
.blur-content {
    filter: blur(40px);
    pointer-events: none;
    user-select: none;
}

/* Contacts Page */
.contacts-description {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.contacts-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s;
}

.contact-item:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.contact-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.contact-info {
    display: flex;
    flex-direction: column;
}

.contact-name {
    font-weight: 600;
    font-size: 1rem;
}

.contact-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    max-width: 420px;
    margin: 1rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.modal-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.modal-text {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--accent-color);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--border-color);
}

/* Loading state */
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-text {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Blog Styles */
.blog-description {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.blog-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.blog-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.2s;
}

.blog-item:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.blog-link {
    width: 100%;
    text-align: left;
    padding: 1rem 1.25rem;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: background 0.2s;
}

.blog-link:hover {
    background: var(--bg-secondary);
}

.blog-title-row {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.blog-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
}

.blog-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--bg-tertiary);
    border-color: var(--accent-color);
}

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

.pagination-btn.active {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
}

.pagination-info {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0 0.5rem;
}

/* Fullscreen Gallery */
.gallery-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.98);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1.2rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 210;
    backdrop-filter: blur(8px);
}

.gallery-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.gallery-prev,
.gallery-next {
    position: absolute;
    bottom: 15px;
    width: 50px;
    height: 50px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1.3rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 210;
    backdrop-filter: blur(8px);
}

.gallery-prev {
    left: 50%;
    margin-left: -90px;
}

.gallery-next {
    left: 50%;
    margin-left: 40px;
}

.gallery-prev:hover,
.gallery-next:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.gallery-image-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.gallery-image-container img {
    max-width: calc(100% - 16px);
    max-height: calc(100% - 16px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
}

.gallery-counter {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    z-index: 210;
    backdrop-filter: blur(8px);
}

/* Loading state */
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

/* Footer */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    margin-top: auto;
    transition: background-color 0.3s, border-color 0.3s;
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 0.5rem;
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.mobile-nav-links {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 0.25rem;
}

.mobile-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    background: none;
    border: none;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    cursor: pointer;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--accent-color);
    background: var(--accent-light);
}

.mobile-nav-icon {
    font-size: 1.25rem;
}

/* ========================================
   RESPONSIVE DESIGN
   Using pointer, hover queries for device detection
   ======================================== */

/* Touch devices (phones, tablets with touch) */
@media (pointer: coarse) {
    /* Larger touch targets */
    .nav-link {
        padding: 0.625rem 1.25rem;
        font-size: 1rem;
    }
    
    .control-btn {
        min-width: 44px;
        height: 44px;
    }
    
    .back-btn {
        width: 44px;
        height: 44px;
    }
    
    .project-link,
    .category-link,
    .blog-link {
        padding: 1.125rem 1.25rem;
        font-size: 1.05rem;
    }
    
    .btn {
        padding: 0.875rem 1.75rem;
        font-size: 1.05rem;
    }
    
    .detail-link {
        padding: 1rem 2rem;
    }
    
    .download-btn {
        padding: 0.75rem 1.25rem;
    }
    
    .contact-item {
        padding: 1.5rem;
    }
    
    .pagination-btn {
        min-width: 44px;
        height: 44px;
    }
    
    /* Larger gallery buttons for touch */
    .gallery-close {
        width: 48px;
        height: 48px;
        font-size: 1.4rem;
    }
    
    .gallery-prev,
    .gallery-next {
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
    }
    
    .steam-thumb {
        width: 100px;
        height: 56px;
    }
}

/* Devices without hover capability */
@media (hover: none) {
    .project-item:hover,
    .category-item:hover,
    .blog-item:hover {
        transform: none;
    }
    
    .contact-item:hover {
        transform: none;
    }
    
    /* Remove hover effects that don't work on touch */
    .project-link:hover,
    .category-link:hover,
    .blog-link:hover {
        background: transparent;
    }
    
    /* Add active states instead */
    .project-link:active,
    .category-link:active,
    .blog-link:active {
        background: var(--bg-secondary);
    }
    
    .contact-item:active {
        border-color: var(--accent-color);
        box-shadow: var(--shadow-md);
    }
}

/* Small screens (phones) */
@media (max-width: 768px) {
    .header-content {
        padding: 0.75rem 1rem;
    }
    
    .header-right {
        gap: 0.5rem;
    }
    
    nav {
        display: none;
    }
    
    .mobile-nav {
        display: block;
    }
    
    main {
        padding: 1.5rem 1rem 1.5rem 1rem;
    }
    
    footer {
        margin-bottom: 70px;
    }
    
    .about-name {
        font-size: 1.75rem;
    }
    
    .about-hero {
        padding: 2rem 0;
    }
    
    .about-avatar {
        width: 100px;
        height: 100px;
    }
    
    .about-section {
        padding: 1.5rem;
    }
    
    .detail-title {
        font-size: 1.5rem;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
    
    .contacts-list {
        grid-template-columns: 1fr;
    }
    
    .steam-gallery-main {
        aspect-ratio: 16/10;
    }
    
    .steam-thumb {
        width: 100px;
        height: 56px;
    }
    
    .gallery-prev,
    .gallery-next {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .gallery-prev {
        margin-left: -70px;
    }
    
    .gallery-next {
        margin-left: 30px;
    }
    
    .gallery-image-container {
        padding: 6px;
    }
    
    .gallery-image-container img {
        max-width: calc(100% - 12px);
        max-height: calc(100% - 12px);
    }
    
    .gallery-close {
        top: 8px;
        right: 8px;
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }
    
    .gallery-counter {
        bottom: 18px;
    }
    
    .section-title {
        font-size: 1.1rem;
    }
    
    .project-link,
    .category-link,
    .blog-link {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
    }
    
    .downloads-section {
        padding: 1rem;
    }
    
    .downloads-list {
        gap: 0.5rem;
    }
    
    .download-btn {
        padding: 0.5rem 0.875rem;
        font-size: 0.85rem;
    }
    
    .detail-link {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
    
    .pagination-btn {
        min-width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
}

/* Touch + Small screen (mobile phones) */
@media (pointer: coarse) and (max-width: 768px) {
    .mobile-nav-link {
        padding: 0.625rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .mobile-nav-icon {
        font-size: 1.5rem;
    }
    
    .project-link,
    .category-link,
    .blog-link {
        padding: 1rem;
        min-height: 56px;
    }
    
    .control-btn {
        min-width: 40px;
        height: 40px;
    }
    
    .gallery-prev,
    .gallery-next {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }
    
    .gallery-prev {
        margin-left: -80px;
    }
    
    .gallery-next {
        margin-left: 32px;
    }
}

/* Large screens (desktop) */
@media (min-width: 1200px) {
    main {
        max-width: 1100px;
    }
    
    .about-content {
        max-width: 800px;
    }
    
    .contacts-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Fine pointer devices (mouse/trackpad) with hover */
@media (pointer: fine) and (hover: hover) {
    /* Smooth hover animations for desktop */
    .project-item,
    .category-item,
    .blog-item {
        transition: all 0.2s ease;
    }
    
    .project-item:hover,
    .category-item:hover,
    .blog-item:hover {
        transform: translateX(4px);
    }
    
    .contact-item:hover {
        transform: translateY(-2px);
    }
    
    .detail-link:hover {
        transform: translateY(-2px);
    }
    
    .download-btn:hover {
        transform: translateY(-1px);
    }
}
