/*
Theme Name: CS 1.6 Downloads
Theme URI: https://cs16.uk
Author: CS16 Team
Author URI: https://cs16.uk
Description: A custom theme for Counter-Strike 1.6 download website - dedicated to CS 1.6 versions, patches, and modifications. Optimized for the gaming community with focus on fast downloads and clear version information.
Requires at least: 6.7
Tested up to: 7.0
Requires PHP: 7.2
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cs16-downloads
Tags: one-column, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, block-patterns, rtl-language-support, sticky-post, threaded-comments, translation-ready, wide-blocks, block-styles, style-variations, accessibility-ready, blog, gaming, downloads, counter-strike
*/

/*
 * IMPORTANT: This file is only served on the frontend when `SCRIPT_DEBUG` is enabled;
 * in most instances, the `style.min.css` file will be served. It is not recommended that you
 * use the Theme File Editor to modify this stylesheet. Instead, add the necessary style
 * overrides via "Additional CSS" in the Site Editor.
 */

/*
 * Link styles
 * https://github.com/WordPress/gutenberg/issues/42319
 */
a {
	text-decoration-thickness: 1px !important;
	text-underline-offset: .1em;
}

/* Focus styles */
:where(.wp-site-blocks *:focus) {
	outline-width: 2px;
	outline-style: solid;
}

/* Increase the bottom margin on submenus, so that the outline is visible. */
.wp-block-navigation .wp-block-navigation-submenu .wp-block-navigation-item:not(:last-child) {
	margin-bottom: 3px;
}

/* Increase the outline offset on the parent menu items, so that the outline does not touch the text. */
.wp-block-navigation .wp-block-navigation-item .wp-block-navigation-item__content {
	outline-offset: 4px;
}

/* Remove outline offset from the submenus, otherwise the outline is visible outside the submenu container. */
.wp-block-navigation .wp-block-navigation-item ul.wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	outline-offset: 0;
}

/*
 * Progressive enhancement to reduce widows and orphans
 * https://github.com/WordPress/gutenberg/issues/55190
 */
h1, h2, h3, h4, h5, h6, blockquote, caption, figcaption, p {
	text-wrap: pretty;
}

/*
 * Change the position of the more block on the front, by making it a block level element.
 * https://github.com/WordPress/gutenberg/issues/65934
*/
.more-link {
	display: block;
}

/*
 * Prevents unnecessary scrollbars while handling long lines of preformatted text.
 * https://core.trac.wordpress.org/ticket/63875
 */
:where(pre) {
	overflow-x: auto;
}

/* ============================================
   CUSTOM STYLES FOR CS 1.6 DOWNLOADS
   ============================================ */

/* Gaming themed colors */
:root {
	--cs-primary: #1a472a;
	--cs-secondary: #2d7d46;
	--cs-accent: #c0392b;
	--cs-dark: #0a0a0a;
	--cs-darker: #1a1a1a;
	--cs-light: #2a2a2a;
	--cs-text: #ffffff;
	--cs-text-muted: #888888;
}

/* Version badge */
.cs-version-badge {
	background: linear-gradient(135deg, var(--cs-primary), var(--cs-secondary));
	color: #fff;
	padding: 4px 16px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: bold;
	text-transform: uppercase;
	display: inline-block;
	margin-bottom: 10px;
	letter-spacing: 1px;
}

/* Download button */
.cs-download-btn {
	background: linear-gradient(135deg, var(--cs-accent), #e74c3c);
	color: #fff;
	padding: 14px 32px;
	border-radius: 8px;
	text-decoration: none;
	font-weight: bold;
	display: inline-block;
	transition: all 0.3s ease;
	border: 2px solid var(--cs-accent);
	text-transform: uppercase;
	letter-spacing: 1px;
	font-size: 14px;
}

.cs-download-btn:hover {
	background: #fff;
	color: var(--cs-accent);
	transform: translateY(-3px);
	box-shadow: 0 6px 20px rgba(192, 57, 43, 0.4);
}

/* Version card */
.cs-version-card {
	background: var(--cs-darker);
	border: 1px solid #333;
	border-radius: 12px;
	padding: 25px;
	margin-bottom: 30px;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cs-version-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
	border-color: var(--cs-secondary);
}

/* Version info grid */
.cs-version-info {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 15px;
	margin: 20px 0;
}

.cs-version-info .info-item {
	background: var(--cs-light);
	padding: 12px;
	border-radius: 8px;
	text-align: center;
}

.cs-version-info .info-item .label {
	color: var(--cs-text-muted);
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.cs-version-info .info-item .value {
	color: var(--cs-text);
	font-weight: bold;
	font-size: 14px;
	margin-top: 4px;
}

/* Screenshots grid */
.cs-screenshots {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 15px;
	margin: 20px 0;
}

.cs-screenshots img {
	width: 100%;
	height: auto;
	border-radius: 8px;
	border: 2px solid #333;
	transition: all 0.3s ease;
}

.cs-screenshots img:hover {
	border-color: var(--cs-secondary);
	transform: scale(1.03);
}

/* System requirements */
.cs-requirements {
	background: var(--cs-darker);
	padding: 25px;
	border-radius: 12px;
	margin: 20px 0;
	border-left: 4px solid var(--cs-secondary);
}

.cs-requirements ul {
	list-style: none;
	padding: 0;
}

.cs-requirements ul li {
	padding: 10px 0;
	border-bottom: 1px solid #333;
	color: #ddd;
}

.cs-requirements ul li:last-child {
	border-bottom: none;
}

.cs-requirements ul li::before {
	content: "▸ ";
	color: var(--cs-secondary);
	font-weight: bold;
}

/* Changelog */
.cs-changelog {
	background: #0d0d0d;
	padding: 25px;
	border-radius: 12px;
	margin: 20px 0;
}

.cs-changelog .changelog-item {
	padding: 12px 0;
	border-bottom: 1px solid #1a1a1a;
	color: #ccc;
}

.cs-changelog .changelog-item .version {
	color: var(--cs-secondary);
	font-weight: bold;
	margin-right: 15px;
}

/* Meta info for posts */
.cs-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	padding: 15px 0;
	border-top: 1px solid #333;
	margin-top: 20px;
	color: var(--cs-text-muted);
	font-size: 13px;
}

.cs-meta span {
	display: flex;
	align-items: center;
	gap: 5px;
}

/* Versions grid */
.cs-versions-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 30px;
	margin: 30px 0;
}

/* Header styling */
.site-header {
	background: linear-gradient(135deg, var(--cs-dark), var(--cs-darker));
	border-bottom: 3px solid var(--cs-secondary);
	padding: 20px 0;
}

.site-title a {
	color: var(--cs-text);
	text-decoration: none;
	font-weight: bold;
}

.site-title a:hover {
	color: var(--cs-secondary);
}

/* Navigation */
.main-navigation a {
	color: #fff;
	transition: color 0.3s ease;
	text-transform: uppercase;
	font-size: 14px;
	letter-spacing: 0.5px;
}

.main-navigation a:hover {
	color: var(--cs-secondary);
}

.main-navigation .current-menu-item a {
	color: var(--cs-secondary);
}

/* Footer */
.site-footer {
	background: var(--cs-dark);
	border-top: 3px solid var(--cs-secondary);
	padding: 40px 0;
	color: var(--cs-text-muted);
}

.site-footer a {
	color: var(--cs-secondary);
	text-decoration: none;
}

.site-footer a:hover {
	color: #fff;
}

/* Animations */
@keyframes pulse {
	0% { transform: scale(1); }
	50% { transform: scale(1.05); }
	100% { transform: scale(1); }
}

.cs-download-btn {
	animation: pulse 2s infinite;
}

/* Custom scrollbar */
::-webkit-scrollbar {
	width: 10px;
}

::-webkit-scrollbar-track {
	background: var(--cs-darker);
}

::-webkit-scrollbar-thumb {
	background: linear-gradient(135deg, var(--cs-secondary), var(--cs-primary));
	border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
	background: #3a9d5a;
}

/* Progress bar for downloads */
.cs-progress {
	width: 100%;
	height: 6px;
	background: var(--cs-light);
	border-radius: 3px;
	overflow: hidden;
	margin: 10px 0;
}

.cs-progress .progress-bar {
	height: 100%;
	background: linear-gradient(90deg, var(--cs-secondary), var(--cs-primary));
	border-radius: 3px;
	transition: width 0.5s ease;
	width: 0%;
}

/* Loading spinner */
.cs-loading {
	display: inline-block;
	width: 20px;
	height: 20px;
	border: 3px solid #f3f3f3;
	border-top: 3px solid var(--cs-secondary);
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

/* Page header */
.page-header {
	background: linear-gradient(135deg, var(--cs-darker), var(--cs-light));
	padding: 40px;
	border-radius: 12px;
	margin-bottom: 30px;
	border-left: 4px solid var(--cs-secondary);
}

.page-title {
	color: var(--cs-text);
	margin-bottom: 10px;
}

.page-header p {
	color: var(--cs-text-muted);
	font-size: 16px;
}

/* Entry title */
.entry-title a {
	color: var(--cs-text);
	text-decoration: none;
}

.entry-title a:hover {
	color: var(--cs-secondary);
}

/* Single version page */
.cs-version-single .entry-header {
	margin-bottom: 30px;
}

.cs-version-single .entry-title {
	font-size: 2.5em;
	margin-bottom: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
	.cs-version-info {
		grid-template-columns: 1fr 1fr;
	}
	
	.cs-screenshots {
		grid-template-columns: 1fr 1fr;
	}
	
	.cs-versions-grid {
		grid-template-columns: 1fr;
	}
	
	.cs-download-btn {
		width: 100%;
		text-align: center;
	}
	
	.page-header {
		padding: 25px;
	}
	
	.cs-version-single .entry-title {
		font-size: 1.8em;
	}
}

@media (max-width: 480px) {
	.cs-version-info {
		grid-template-columns: 1fr;
	}
	
	.cs-screenshots {
		grid-template-columns: 1fr;
	}
	
	.cs-meta {
		flex-direction: column;
		gap: 10px;
	}
}