/**
 * Staph Win - Design CSS
 * All classes use s317- prefix for namespace isolation
 */

/* CSS Variables */
:root {
    --s317-bg-primary: #2D2D2D;
    --s317-bg-secondary: #1a1a1a;
    --s317-bg-tertiary: #3a3a3a;
    --s317-primary: #FF4500;
    --s317-secondary: #FF8000;
    --s317-accent: #FFEB3B;
    --s317-text: #ffffff;
    --s317-text-muted: #b0b0b0;
    --s317-border: #444444;
    --s317-success: #4caf50;
    --s317-shadow: rgba(0, 0, 0, 0.3);
}

/* Reset and Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 1.4rem;
    line-height: 1.5;
    color: var(--s317-text);
    background-color: var(--s317-bg-primary);
    min-height: 100vh;
}

/* Container */
.s317-container {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.s317-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--s317-bg-secondary) 0%, var(--s317-bg-primary) 100%);
    border-bottom: 2px solid var(--s317-primary);
    z-index: 1000;
    box-shadow: 0 2px 10px var(--s317-shadow);
}

.s317-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1rem;
    max-width: 430px;
    margin: 0 auto;
}

.s317-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--s317-text);
    font-size: 1.6rem;
    font-weight: 700;
}

.s317-logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.s317-header-buttons {
    display: flex;
    gap: 0.5rem;
}

.s317-btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.s317-btn-primary {
    background: linear-gradient(135deg, var(--s317-primary) 0%, var(--s317-secondary) 100%);
    color: var(--s317-text);
}

.s317-btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 69, 0, 0.4);
}

.s317-btn-secondary {
    background: transparent;
    color: var(--s317-accent);
    border: 2px solid var(--s317-accent);
}

.s317-btn-secondary:hover {
    background: var(--s317-accent);
    color: var(--s317-bg-primary);
}

/* Mobile Menu Toggle */
.s317-menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.s317-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--s317-accent);
    transition: all 0.3s ease;
}

/* Mobile Menu */
.s317-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.s317-menu-overlay.s317-active {
    opacity: 1;
    visibility: visible;
}

.s317-mobile-menu {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background: var(--s317-bg-secondary);
    z-index: 9999;
    transition: right 0.3s ease;
    overflow-y: auto;
    box-shadow: -2px 0 15px var(--s317-shadow);
}

.s317-mobile-menu.s317-active {
    right: 0;
}

.s317-mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--s317-border);
}

.s317-mobile-menu-close {
    background: none;
    border: none;
    color: var(--s317-text);
    font-size: 2rem;
    cursor: pointer;
}

.s317-mobile-menu-nav {
    padding: 1rem 0;
}

.s317-mobile-menu-nav a {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--s317-text);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.s317-mobile-menu-nav a:hover {
    background: var(--s317-bg-tertiary);
    border-left-color: var(--s317-primary);
    padding-left: 2rem;
}

/* Main Content */
main {
    padding-top: 70px;
    padding-bottom: 80px;
}

@media (min-width: 769px) {
    main {
        padding-bottom: 2rem;
    }
}

/* Carousel */
.s317-carousel {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-radius: 12px;
    margin: 1rem 0;
}

.s317-carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.s317-carousel-slide.s317-active {
    opacity: 1;
}

.s317-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.s317-carousel-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.s317-carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.s317-carousel-dot.s317-active {
    background: var(--s317-accent);
    transform: scale(1.2);
}

/* Section Titles */
.s317-section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--s317-accent);
    margin: 2rem 0 1rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.s317-section-title span {
    color: var(--s317-primary);
}

/* Game Grid */
.s317-game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.8rem;
    margin: 1.5rem 0;
}

.s317-game-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--s317-text);
    transition: transform 0.3s ease;
}

.s317-game-item:hover {
    transform: scale(1.05);
}

.s317-game-icon {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: var(--s317-bg-tertiary);
    margin-bottom: 0.5rem;
}

.s317-game-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.s317-game-name {
    font-size: 1rem;
    text-align: center;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Content Cards */
.s317-card {
    background: var(--s317-bg-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border: 1px solid var(--s317-border);
}

.s317-card-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--s317-accent);
    margin-bottom: 1rem;
}

.s317-card-content {
    font-size: 1.4rem;
    line-height: 1.6;
    color: var(--s317-text-muted);
}

.s317-card-content p {
    margin-bottom: 1rem;
}

.s317-card-content a {
    color: var(--s317-primary);
    text-decoration: none;
    font-weight: 600;
}

.s317-card-content a:hover {
    color: var(--s317-accent);
    text-decoration: underline;
}

/* Feature Lists */
.s317-feature-list {
    list-style: none;
    padding: 0;
}

.s317-feature-list li {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--s317-border);
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
}

.s317-feature-list li:last-child {
    border-bottom: none;
}

.s317-feature-list li i,
.s317-feature-list li span.icon {
    color: var(--s317-accent);
    flex-shrink: 0;
    margin-top: 2px;
}

/* FAQ Items */
.s317-faq-item {
    background: var(--s317-bg-tertiary);
    border-radius: 8px;
    padding: 1.2rem;
    margin-bottom: 1rem;
}

.s317-faq-question {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--s317-accent);
    margin-bottom: 0.5rem;
}

.s317-faq-answer {
    font-size: 1.3rem;
    color: var(--s317-text-muted);
    line-height: 1.6;
}

/* Bottom Navigation */
.s317-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, var(--s317-bg-secondary) 0%, var(--s317-bg-primary) 100%);
    border-top: 2px solid var(--s317-primary);
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0;
    z-index: 1000;
    box-shadow: 0 -2px 10px var(--s317-shadow);
}

@media (min-width: 769px) {
    .s317-bottom-nav {
        display: none;
    }
}

.s317-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--s317-text-muted);
    min-width: 60px;
    min-height: 60px;
    justify-content: center;
    transition: all 0.3s ease;
}

.s317-bottom-nav a:hover,
.s317-bottom-nav a.s317-active {
    color: var(--s317-accent);
}

.s317-bottom-nav a.s317-active {
    background: rgba(255, 235, 59, 0.1);
    border-radius: 8px;
}

.s317-bottom-nav-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.s317-bottom-nav-text {
    font-size: 10px;
    font-weight: 500;
    text-align: center;
}

/* Footer */
.s317-footer {
    background: var(--s317-bg-secondary);
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 2px solid var(--s317-primary);
}

.s317-footer-content {
    max-width: 430px;
    margin: 0 auto;
    padding: 0 1rem;
}

.s317-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.s317-footer-links a {
    color: var(--s317-primary);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.s317-footer-links a:hover {
    color: var(--s317-accent);
}

.s317-partners {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin: 1.5rem 0;
}

.s317-partners img {
    height: 30px;
    width: auto;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.s317-partners img:hover {
    opacity: 1;
}

.s317-copyright {
    text-align: center;
    color: var(--s317-text-muted);
    font-size: 1.2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--s317-border);
}

/* H1 Styling */
h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--s317-accent);
    text-align: center;
    margin: 1.5rem 0;
    line-height: 1.3;
    padding: 0 1rem;
}

h1 span {
    color: var(--s317-primary);
}

/* Utility Classes */
.s317-text-center {
    text-align: center;
}

.s317-mt-1 { margin-top: 1rem; }
.s317-mt-2 { margin-top: 2rem; }
.s317-mb-1 { margin-bottom: 1rem; }
.s317-mb-2 { margin-bottom: 2rem; }

.s317-highlight {
    color: var(--s317-primary);
    font-weight: 600;
}

/* Responsive */
@media (max-width: 380px) {
    .s317-game-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .s317-carousel {
        height: 150px;
    }
}
