/* Home Page Styles */

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-500), var(--secondary-500));
    color: var(--white);
    padding: 2.5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    background: linear-gradient(45deg, var(--primary-400), var(--secondary-400), var(--accent-400), var(--warm-400));
    background-size: 400% 400%;
    transform: translate(-50%, -50%) rotate(0deg);
    border-radius: 20px;
    opacity: 0.15;
    animation: rotateAndShift 12s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    background: linear-gradient(45deg, var(--secondary-300), var(--accent-300), var(--warm-300), var(--primary-300));
    background-size: 400% 400%;
    transform: translate(-50%, -50%) rotate(0deg);
    border-radius: 15px;
    opacity: 0.1;
    animation: rotateAndShift 8s ease-in-out infinite reverse;
}

@keyframes rotateAndShift {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
        background-position: 0% 50%;
    }
    25% {
        transform: translate(-50%, -50%) rotate(90deg);
        background-position: 100% 50%;
    }
    50% {
        transform: translate(-50%, -50%) rotate(180deg);
        background-position: 100% 100%;
    }
    75% {
        transform: translate(-50%, -50%) rotate(270deg);
        background-position: 0% 100%;
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
        background-position: 0% 50%;
    }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 4px var(--text-shadow);
}

.hero-subtitle {
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: 0;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

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

.hero-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.hero-btn-primary {
    background: var(--white);
    color: var(--primary-600);
}

.hero-btn-primary:hover {
    background: var(--neutral-50);
}

.hero-btn-secondary {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}

.hero-btn-secondary:hover {
    background: var(--white);
    color: var(--primary-600);
}

/* Responsive hero */
@media (min-width: 768px) {
    .hero {
        padding: 3.5rem 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
}

@media (min-width: 1024px) {
    .hero {
        padding: 4rem 0;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
}

/* Games Section */
.games-section {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

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

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Game Cards Grid */
.games-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

@media (min-width: 640px) {
    .games-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }
}

@media (min-width: 768px) {
    .games-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 2rem;
    }
}

@media (min-width: 1024px) {
    .games-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Game Card */
.game-card {
    background: var(--game-card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--game-card-shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--game-card-shadow-hover);
}

.game-card-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-100), var(--secondary-100));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.game-card-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, var(--gradient-overlay) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.game-card:hover .game-card-image::before {
    transform: translateX(100%);
}

.game-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.game-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.game-card-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex: 1;
}

.game-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    margin-top: auto;
}

.game-card-difficulty {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.difficulty-easy { color: var(--success-600); }
.difficulty-medium { color: var(--warning-600); }
.difficulty-hard { color: var(--error-600); }

.game-card-players {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.game-card-button {
    width: 100%;
    padding: 0.75rem;
    background: var(--game-button-bg);
    color: var(--game-button-text);
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.game-card-button:hover {
    background: var(--game-button-hover);
    transform: translateY(-1px);
}

/* Coming Soon Button Styles */
.game-card-button[href="#"] {
    background: var(--game-button-coming-soon-bg);
    color: var(--game-button-coming-soon-text);
    cursor: not-allowed;
}

.game-card-button[href="#"]:hover {
    background: var(--game-button-coming-soon-hover);
    transform: none;
}

/* Categories Section */
.categories-section {
    padding: 4rem 0;
    background: var(--neutral-50);
}

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

@media (min-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
}

.category-card {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--game-card-shadow);
    transition: all 0.2s ease;
    text-decoration: none;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--game-card-shadow-hover);
    color: var(--primary-600);
}

.category-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
}

.category-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

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

/* Stats Section */
.stats-section {
    padding: 3rem 0;
    background: var(--primary-600);
    color: var(--white);
}

.stats-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Loading states */
.loading-skeleton {
    background: linear-gradient(90deg, var(--neutral-200) 25%, var(--neutral-100) 50%, var(--neutral-200) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

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

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

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.empty-state-description {
    font-size: 0.875rem;
    max-width: 400px;
    margin: 0 auto;
}

/* Game Launch Transition */
.game-launch-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-launch-overlay.active {
    opacity: 1;
    visibility: visible;
}

.game-launch-content {
    text-align: center;
    color: var(--text-primary);
}

.game-launch-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: pulse 1.5s ease-in-out infinite;
}

.game-launch-text {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.game-launch-subtext {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Loading spinner for game launch */
.game-launch-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--neutral-300);
    border-top: 3px solid var(--primary-600);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 1rem auto;
}

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