/**
 * BF777 - Theme Styles
 * All classes use 's301-' prefix to avoid conflicts
 */

/* CSS Variables for color palette */
:root {
    --s301-primary: #FF6347;
    --s301-primary-dark: #BF360C;
    --s301-accent: #FFBF00;
    --s301-secondary: #AFEEEE;
    --s301-bg: #0F0F23;
    --s301-bg-light: #FAFAFA;
    --s301-text: #FAFAFA;
    --s301-text-dark: #0F0F23;
    --s301-border: #FF6347;
    --s301-shadow: rgba(255, 99, 71, 0.3);
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 1.6rem;
    line-height: 1.5;
    color: var(--s301-text);
    background-color: var(--s301-bg);
    overflow-x: hidden;
    max-width: 430px;
    margin: 0 auto;
    padding-bottom: 70px;
}

@media (min-width: 769px) {
    body {
        padding-bottom: 0;
    }
}

/* Container */
.s301-container {
    max-width: 430px;
    margin: 0 auto;
    padding: 0 1rem;
}

.s301-wrapper {
    padding: 1rem;
}

/* Header styles */
.s301-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    max-width: 430px;
    margin: 0 auto;
    background-color: var(--s301-bg);
    border-bottom: 2px solid var(--s301-primary);
    z-index: 1000;
    box-shadow: 0 2px 10px var(--s301-shadow);
}

.s301-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1rem;
    height: 60px;
}

.s301-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--s301-text);
}

.s301-logo-icon {
    width: 32px;
    height: 32px;
    margin-right: 0.5rem;
}

.s301-logo-text {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--s301-primary);
}

.s301-header-btns {
    display: flex;
    gap: 0.8rem;
}

.s301-btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 8px;
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.s301-btn-primary {
    background: linear-gradient(135deg, var(--s301-primary), var(--s301-primary-dark));
    color: var(--s301-text);
}

.s301-btn-secondary {
    background: linear-gradient(135deg, var(--s301-accent), #FFA500);
    color: var(--s301-text-dark);
}

.s301-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--s301-shadow);
}

.s301-btn:active {
    transform: scale(0.98);
}

.s301-touch-active {
    transform: scale(0.95);
}

/* Mobile menu toggle */
.s301-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 28px;
    height: 24px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.s301-menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--s301-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Mobile menu */
.s301-mobile-menu {
    position: fixed;
    top: 60px;
    left: -100%;
    width: 100%;
    max-width: 430px;
    height: calc(100vh - 60px);
    background-color: var(--s301-bg);
    transition: left 0.3s ease;
    z-index: 9999;
    overflow-y: auto;
    padding: 1rem 0;
}

.s301-menu-open {
    left: 0;
}

.s301-menu-item {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--s301-text);
    text-decoration: none;
    font-size: 1.6rem;
    border-bottom: 1px solid rgba(255, 99, 71, 0.2);
    transition: background-color 0.3s ease;
}

.s301-menu-item:hover {
    background-color: rgba(255, 99, 71, 0.1);
    color: var(--s301-primary);
}

/* Main content */
.s301-main {
    margin-top: 70px;
    padding: 1rem;
}

/* Carousel */
.s301-carousel {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.s301-carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.s301-carousel-slide.s301-active {
    opacity: 1;
}

.s301-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.s301-carousel-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.s301-carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(250, 250, 250, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.s301-carousel-dot.s301-active {
    background-color: var(--s301-primary);
    transform: scale(1.2);
}

/* Headings */
.s301-title {
    color: var(--s301-primary);
    margin-bottom: 1.5rem;
    font-size: 2.2rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.s301-section-title {
    color: var(--s301-accent);
    margin: 2rem 0 1rem;
    font-size: 1.9rem;
    border-left: 4px solid var(--s301-primary);
    padding-left: 1rem;
}

/* Game grid */
.s301-game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.8rem;
    margin-bottom: 2rem;
}

.s301-game-item {
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.s301-game-item:hover {
    transform: scale(1.05);
}

.s301-game-icon {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.s301-game-name {
    font-size: 1.1rem;
    color: var(--s301-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

/* Cards */
.s301-card {
    background: linear-gradient(135deg, rgba(255, 99, 71, 0.1), rgba(191, 54, 12, 0.1));
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--s301-primary);
}

.s301-card-title {
    color: var(--s301-accent);
    font-size: 1.7rem;
    margin-bottom: 1rem;
}

.s301-card-content {
    color: var(--s301-text);
    line-height: 1.6;
}

.s301-card-content p {
    margin-bottom: 1rem;
}

/* Links */
.s301-link {
    color: var(--s301-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.s301-link:hover {
    color: var(--s301-accent);
    text-decoration: underline;
}

/* Footer */
.s301-footer {
    background-color: rgba(255, 99, 71, 0.1);
    border-top: 2px solid var(--s301-primary);
    padding: 2rem 1rem;
    margin-top: 3rem;
}

.s301-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.s301-footer-link {
    color: var(--s301-secondary);
    text-decoration: none;
    font-size: 1.4rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--s301-secondary);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.s301-footer-link:hover {
    background-color: var(--s301-primary);
    color: var(--s301-text);
    border-color: var(--s301-primary);
}

.s301-partners {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}

.s301-partner-icon {
    width: 50px;
    height: 50px;
    object-fit: contain;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.s301-partner-icon:hover {
    opacity: 1;
}

.s301-copyright {
    text-align: center;
    color: var(--s301-secondary);
    font-size: 1.3rem;
    margin-top: 1.5rem;
}

/* Bottom navigation */
.s301-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 430px;
    margin: 0 auto;
    height: 60px;
    background: linear-gradient(180deg, var(--s301-bg) 0%, rgba(15, 15, 35, 0.98) 100%);
    border-top: 2px solid var(--s301-primary);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 -2px 10px var(--s301-shadow);
}

@media (min-width: 769px) {
    .s301-bottom-nav {
        display: none;
    }
}

.s301-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    min-height: 60px;
    text-decoration: none;
    color: var(--s301-text);
    transition: all 0.3s ease;
    cursor: pointer;
    padding: 0.5rem;
}

.s301-nav-item:hover {
    transform: scale(1.1);
}

.s301-nav-item:active {
    transform: scale(0.95);
}

.s301-nav-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.s301-nav-text {
    font-size: 10px;
    color: var(--s301-secondary);
}

.s301-nav-item.active .s301-nav-icon,
.s301-nav-item.active .s301-nav-text {
    color: var(--s301-primary);
}

/* Promotional text */
.s301-promo-text {
    color: var(--s301-accent);
    font-weight: bold;
    font-size: 1.6rem;
}

.s301-highlight {
    color: var(--s301-primary);
    font-weight: bold;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .s301-main {
        padding-bottom: 80px;
    }
}

/* Utility classes */
.s301-text-center {
    text-align: center;
}

.s301-mt-1 { margin-top: 1rem; }
.s301-mt-2 { margin-top: 2rem; }
.s301-mb-1 { margin-bottom: 1rem; }
.s301-mb-2 { margin-bottom: 2rem; }
