/* playmini.space Main Styles */

/* CSS Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #000000;
    color: #F4F4F5;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 48px;
}

@media (max-width: 768px) {
    .container {
        padding: 0 24px;
    }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: #F4F4F5;
}

h1 { font-size: 48px; font-weight: 700; }
h2 { font-size: 32px; font-weight: 600; }
h3 { font-size: 20px; font-weight: 600; }
h4 { font-size: 18px; font-weight: 600; }

p {
    color: #A1A1AA;
    line-height: 1.6;
}

/* Header */
.header {
    background: rgba(17, 17, 17, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #27272A;
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 16px 0;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo h1 {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #8B5CF6, #A78BFA);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.tagline {
    font-size: 12px;
    color: #A1A1AA;
    font-weight: 500;
}

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

.nav-link {
    color: #A1A1AA;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
}

.nav-link:hover {
    color: #8B5CF6;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #8B5CF6;
    transition: width 0.2s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #F4F4F5;
    font-size: 24px;
    cursor: pointer;
}

/* Hero Section */
.hero {
    padding: 96px 0;
    text-align: center;
    background: radial-gradient(ellipse at center, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #F4F4F5 0%, #8B5CF6 50%, #A78BFA 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 20px;
    color: #A1A1AA;
    margin-bottom: 32px;
    line-height: 1.4;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
    min-height: 56px;
}

.btn-primary {
    background: #8B5CF6;
    color: white;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    background: #A78BFA;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4);
}

.btn-primary:active {
    background: #6D28D9;
    transform: scale(0.98);
}

.btn-secondary {
    background: #111111;
    color: #F4F4F5;
    border: 1px solid #27272A;
}

.btn-secondary:hover {
    background: #18181B;
    border-color: #8B5CF6;
    color: #8B5CF6;
    transform: translateY(-2px);
}

/* Search Section */
.search-section {
    padding: 32px 0;
    background: rgba(17, 17, 17, 0.5);
}

.search-controls {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.search-bar {
    position: relative;
    margin-bottom: 24px;
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #A1A1AA;
    font-size: 20px;
}

.search-input {
    width: 100%;
    height: 64px;
    background: #111111;
    border: 1px solid #27272A;
    border-radius: 16px;
    color: #F4F4F5;
    font-size: 16px;
    padding: 0 20px 0 56px;
    transition: all 0.25s ease;
}

.search-input:focus {
    outline: none;
    border-color: #8B5CF6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.search-input::placeholder {
    color: #52525B;
}

.category-filters {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-btn {
    height: 44px;
    padding: 0 16px;
    background: #111111;
    border: 1px solid #27272A;
    border-radius: 16px;
    color: #A1A1AA;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
}

.filter-btn:hover {
    background: #18181B;
}

.filter-btn.active {
    background: #8B5CF6;
    color: white;
    border-color: transparent;
}

/* Main Content */
.main {
    padding: 48px 0;
}

/* Ad Spaces */
.ad-space {
    background: #111111;
    border: 1px solid #27272A;
    border-radius: 16px;
    margin: 24px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
}

.ad-placeholder {
    text-align: center;
    color: #52525B;
}

.ad-placeholder span {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

.header-ad {
    min-height: 100px;
}

.sidebar-ad {
    min-height: 300px;
    margin: 24px 0;
}

/* Stats Section */
.stats-section {
    margin: 48px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
}

.stat-card {
    background: #111111;
    border: 1px solid #27272A;
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.2);
    border-color: #8B5CF6;
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: #8B5CF6;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: #A1A1AA;
    font-weight: 500;
}

/* Section Titles */
.section-title {
    font-size: 24px;
    margin-bottom: 24px;
    color: #F4F4F5;
}

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

/* Sort Controls */
.sort-select {
    background: #111111;
    border: 1px solid #27272A;
    border-radius: 12px;
    color: #F4F4F5;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
}

.sort-select:focus {
    outline: none;
    border-color: #8B5CF6;
}

/* Games Grid */
.games-section {
    margin: 48px 0;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.game-card {
    background: #111111;
    border: 1px solid #27272A;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 0 24px rgba(139, 92, 246, 0.3);
    border-color: #8B5CF6;
}

.game-thumbnail {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.game-thumbnail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(139, 92, 246, 0.1) 0%, 
        rgba(167, 139, 250, 0.1) 50%, 
        rgba(139, 92, 246, 0.1) 100%);
    animation: shimmer 2s ease-in-out infinite alternate;
}

@keyframes shimmer {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

.game-icon {
    font-size: 48px;
    z-index: 2;
    position: relative;
}

.game-content {
    padding: 20px;
}

.game-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #F4F4F5;
}

.game-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #A1A1AA;
    font-size: 14px;
}

.game-stats {
    display: flex;
    gap: 12px;
    align-items: center;
}

.game-play-count {
    display: flex;
    align-items: center;
    gap: 4px;
}

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

.game-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(139, 92, 246, 0.9);
    border: none;
    border-radius: 50%;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 3;
}

.game-card:hover .game-play-btn {
    opacity: 1;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 120px;
    height: fit-content;
}

.leaderboard-widget,
.achievements-widget {
    background: #111111;
    border: 1px solid #27272A;
    border-radius: 16px;
    padding: 24px;
    margin: 24px 0;
}

.leaderboard-widget h4,
.achievements-widget h4 {
    color: #F4F4F5;
    margin-bottom: 16px;
    font-size: 16px;
}

.leaderboard-item,
.achievement-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #27272A;
}

.leaderboard-item:last-child,
.achievement-item:last-child {
    border-bottom: none;
}

.leaderboard-rank {
    background: #8B5CF6;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.leaderboard-name {
    flex: 1;
    color: #F4F4F5;
    font-size: 14px;
}

.leaderboard-score {
    color: #8B5CF6;
    font-weight: 600;
    font-size: 14px;
}

/* Game Modal */
.game-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    backdrop-filter: blur(8px);
}

.game-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-modal-content {
    background: #111111;
    border: 1px solid #27272A;
    border-radius: 24px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
}

.game-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #27272A;
}

.game-title {
    font-size: 24px;
    font-weight: 600;
    color: #F4F4F5;
}

.close-btn {
    background: none;
    border: none;
    color: #A1A1AA;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.close-btn:hover {
    color: #F4F4F5;
    background: #27272A;
}

.game-container {
    width: 100%;
    height: 600px;
    background: #000000;
    position: relative;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.game-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    padding: 20px 24px;
    border-bottom: 1px solid #27272A;
    background: #0a0a0a;
}

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

.stat-label {
    display: block;
    color: #A1A1AA;
    font-size: 12px;
    margin-bottom: 4px;
}

.stat-value {
    display: block;
    color: #8B5CF6;
    font-size: 20px;
    font-weight: 600;
}

.game-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 24px;
    background: #0a0a0a;
}

/* Trending Section */
.trending-section {
    margin: 48px 0;
}

.trending-games {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

/* Footer */
.footer {
    background: #0a0a0a;
    border-top: 1px solid #27272A;
    margin-top: 96px;
    padding: 48px 0 24px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
    margin-bottom: 32px;
}

.footer-section h4 {
    color: #F4F4F5;
    margin-bottom: 16px;
    font-size: 16px;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 8px;
}

.footer-section a {
    color: #A1A1AA;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-section a:hover {
    color: #8B5CF6;
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid #27272A;
    color: #52525B;
    font-size: 14px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid #27272A;
    border-top-color: #8B5CF6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Success/Error States */
.success {
    color: #22C55E;
}

.error {
    color: #EF4444;
}

.warning {
    color: #F59E0B;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

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

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

.text-right {
    text-align: right;
}

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }

.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }

.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }