/* Modern WapX.WS Styles - Mobile First Responsive Design */

/* CSS Variables for easy theming */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--bg-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 20px 0;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    color: white;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo:hover {
    opacity: 0.9;
}

/* Search Form */
.search-form {
    flex: 1;
    max-width: 500px;
    display: flex;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-color);
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
}

.btn-secondary:hover {
    background: var(--bg-color);
}

/* Main Content */
.main-content {
    padding: 40px 0;
    min-height: calc(100vh - 200px);
}

/* Grid Layout for Games */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
    margin: 30px 0;
}

/* Game Card */
.game-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.game-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: var(--bg-color);
}

.game-info {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.game-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 8px;
    text-decoration: none;
    display: block;
}

.game-title:hover {
    color: var(--primary-color);
}

.game-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    font-size: 14px;
    color: var(--text-light);
    flex-wrap: wrap;
}

.game-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: var(--bg-color);
    color: var(--text-color);
}

.badge-touch {
    background: #fef3c7;
    color: #92400e;
}

.badge-android {
    background: #d1fae5;
    color: #065f46;
}

.resolutions {
    font-size: 12px;
    color: var(--text-light);
    margin-top: auto;
    padding-top: 8px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 40px 0;
}

.page-link {
    padding: 10px 16px;
    border-radius: 8px;
    background: white;
    color: var(--text-color);
    text-decoration: none;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.page-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-link.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Game Detail Page */
.game-detail {
    background: white;
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
}

.game-header {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.game-cover {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.game-details h1 {
    font-size: 32px;
    margin-bottom: 15px;
    color: var(--text-color);
}

.game-stats {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.stat {
    padding: 12px 20px;
    background: var(--bg-color);
    border-radius: 8px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 14px;
    color: var(--text-light);
}

.download-section {
    background: var(--bg-color);
    padding: 20px;
    border-radius: var(--radius);
    margin: 20px 0;
}

.resolution-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.btn-resolution {
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-resolution:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* Voting Section */
.vote-section {
    display: flex;
    gap: 15px;
    margin: 20px 0;
}

.vote-btn {
    padding: 12px 24px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: var(--transition);
    font-size: 16px;
}

.vote-btn:hover {
    transform: scale(1.05);
}

.vote-btn.positive {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.vote-btn.positive:hover {
    background: var(--secondary-color);
    color: white;
}

.vote-btn.negative {
    border-color: #ef4444;
    color: #ef4444;
}

.vote-btn.negative:hover {
    background: #ef4444;
    color: white;
}

/* Sidebar */
.sidebar {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.sidebar h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--text-color);
}

.sidebar-list {
    list-style: none;
}

.sidebar-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-list li:last-child {
    border-bottom: none;
}

.sidebar-list a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.sidebar-list a:hover {
    color: var(--primary-color);
}

/* Footer */
.footer {
    background: var(--text-color);
    color: white;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer h4 {
    margin-bottom: 15px;
    font-size: 18px;
}

.footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* Loading Spinner */
.spinner {
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 40px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
    }
    
    .search-form {
        width: 100%;
        max-width: 100%;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 16px;
    }
    
    .game-header {
        grid-template-columns: 1fr;
    }
    
    .logo {
        font-size: 24px;
    }
    
    .container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .game-image {
        height: 200px;
    }
    
    .game-title {
        font-size: 16px;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.hidden { display: none; }
