/**
 * CardTime CFD Gaming Platform CSS
 * All classes prefixed with: tfec5-
 */

/* CSS Variables */
:root {
    /* Color Palette */
    --tfec5-primary: #26A69A;
    --tfec5-secondary: #D3D3D3;
    --tfec5-dark: #1A1A2E;
    --tfec5-light: #B2DFDB;
    --tfec5-accent: #DEB887;
    --tfec5-gray: #5D5D5D;

    /* Functional Colors */
    --tfec5-bg: #1A1A2E;
    --tfec5-text: #B2DFDB;
    --tfec5-text-secondary: #D3D3D3;
    --tfec5-border: #26A69A;
    --tfec5-hover: #2BBBAD;
    --tfec5-active: #1F8A7A;
    --tfec5-success: #4CAF50;
    --tfec5-warning: #FF9800;
    --tfec5-error: #F44336;

    /* Typography */
    --tfec5-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    --tfec5-font-size-base: 1.6rem;
    --tfec5-line-height: 1.5;

    /* Spacing */
    --tfec5-spacing-xs: 0.4rem;
    --tfec5-spacing-sm: 0.8rem;
    --tfec5-spacing-md: 1.6rem;
    --tfec5-spacing-lg: 2.4rem;
    --tfec5-spacing-xl: 3.2rem;

    /* Layout */
    --tfec5-container-max: 43rem;
    --tfec5-header-height: 6rem;
    --tfec5-bottom-nav-height: 6.4rem;

    /* Border Radius */
    --tfec5-radius-sm: 0.4rem;
    --tfec5-radius-md: 0.8rem;
    --tfec5-radius-lg: 1.2rem;
    --tfec5-radius-full: 50%;

    /* Shadows */
    --tfec5-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
    --tfec5-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --tfec5-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --tfec5-shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--tfec5-font-family);
    font-size: var(--tfec5-font-size-base);
    line-height: var(--tfec5-line-height);
    background-color: var(--tfec5-bg);
    color: var(--tfec5-text);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Utility Classes */
.tfec5-container {
    max-width: var(--tfec5-container-max);
    margin: 0 auto;
    padding: 0 var(--tfec5-spacing-md);
}

.tfec5-wrapper {
    width: 100%;
    position: relative;
}

.tfec5-grid {
    display: grid;
    gap: var(--tfec5-spacing-md);
}

.tfec5-flex {
    display: flex;
}

.tfec5-flex-col {
    flex-direction: column;
}

.tfec5-flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tfec5-flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tfec5-text-center {
    text-align: center;
}

.tfec5-text-primary {
    color: var(--tfec5-primary);
}

.tfec5-text-secondary {
    color: var(--tfec5-text-secondary);
}

.tfec5-mb-sm { margin-bottom: var(--tfec5-spacing-sm); }
.tfec5-mb-md { margin-bottom: var(--tfec5-spacing-md); }
.tfec5-mb-lg { margin-bottom: var(--tfec5-spacing-lg); }
.tfec5-mb-xl { margin-bottom: var(--tfec5-spacing-xl); }

/* Header */
.tfec5-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--tfec5-header-height);
    background: linear-gradient(135deg, var(--tfec5-dark) 0%, var(--tfec5-gray) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--tfec5-border);
    z-index: 1000;
    box-shadow: var(--tfec5-shadow-md);
}

.tfec5-header-content {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--tfec5-spacing-md);
}

.tfec5-logo {
    display: flex;
    align-items: center;
    gap: var(--tfec5-spacing-sm);
    text-decoration: none;
    color: var(--tfec5-text);
    font-weight: 700;
    font-size: 2rem;
}

.tfec5-logo-icon {
    width: 2.8rem;
    height: 2.8rem;
    background: var(--tfec5-primary);
    border-radius: var(--tfec5-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: white;
}

.tfec5-header-actions {
    display: flex;
    align-items: center;
    gap: var(--tfec5-spacing-sm);
}

.tfec5-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--tfec5-spacing-sm) var(--tfec5-spacing-md);
    border: none;
    border-radius: var(--tfec5-radius-md);
    font-size: 1.4rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 4.4rem;
    white-space: nowrap;
}

.tfec5-btn-primary {
    background: linear-gradient(135deg, var(--tfec5-primary) 0%, var(--tfec5-hover) 100%);
    color: white;
    box-shadow: var(--tfec5-shadow-sm);
}

.tfec5-btn-primary:hover {
    background: linear-gradient(135deg, var(--tfec5-hover) 0%, var(--tfec5-active) 100%);
    transform: translateY(-1px);
    box-shadow: var(--tfec5-shadow-md);
}

.tfec5-btn-secondary {
    background: transparent;
    color: var(--tfec5-primary);
    border: 2px solid var(--tfec5-primary);
}

.tfec5-btn-secondary:hover {
    background: var(--tfec5-primary);
    color: white;
}

.tfec5-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--tfec5-text);
    font-size: 2.4rem;
    cursor: pointer;
    padding: var(--tfec5-spacing-sm);
    border-radius: var(--tfec5-radius-sm);
    transition: background-color 0.3s ease;
}

.tfec5-menu-toggle:hover {
    background-color: rgba(38, 166, 154, 0.1);
}

/* Mobile Menu */
.tfec5-mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 32rem;
    height: 100vh;
    background: linear-gradient(135deg, var(--tfec5-dark) 0%, var(--tfec5-gray) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999;
    transition: right 0.3s ease;
    overflow-y: auto;
    border-left: 1px solid var(--tfec5-border);
}

.tfec5-mobile-menu.tfec5-active {
    right: 0;
}

.tfec5-menu-header {
    padding: var(--tfec5-spacing-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--tfec5-border);
}

.tfec5-menu-close {
    background: none;
    border: none;
    color: var(--tfec5-text);
    font-size: 2.4rem;
    cursor: pointer;
    padding: var(--tfec5-spacing-sm);
    border-radius: var(--tfec5-radius-sm);
    transition: background-color 0.3s ease;
}

.tfec5-menu-close:hover {
    background-color: rgba(38, 166, 154, 0.1);
}

.tfec5-menu-nav {
    padding: var(--tfec5-spacing-md);
}

.tfec5-menu-item {
    display: block;
    padding: var(--tfec5-spacing-md);
    color: var(--tfec5-text);
    text-decoration: none;
    border-radius: var(--tfec5-radius-md);
    transition: all 0.3s ease;
    margin-bottom: var(--tfec5-spacing-xs);
}

.tfec5-menu-item:hover {
    background-color: rgba(38, 166, 154, 0.1);
    color: var(--tfec5-primary);
}

.tfec5-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.tfec5-menu-overlay.tfec5-active {
    opacity: 1;
    visibility: visible;
}

/* Main Content */
.tfec5-main {
    margin-top: var(--tfec5-header-height);
    min-height: calc(100vh - var(--tfec5-header-height));
}

.tfec5-main-content {
    padding-bottom: calc(var(--tfec5-bottom-nav-height) + var(--tfec5-spacing-xl));
}

/* Carousel */
.tfec5-carousel {
    position: relative;
    width: 100%;
    height: 20rem;
    overflow: hidden;
    border-radius: var(--tfec5-radius-lg);
    margin-bottom: var(--tfec5-spacing-xl);
    box-shadow: var(--tfec5-shadow-lg);
}

.tfec5-carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.tfec5-carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    cursor: pointer;
}

.tfec5-carousel-slide.tfec5-active {
    opacity: 1;
}

.tfec5-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tfec5-carousel-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--tfec5-spacing-lg);
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
}

.tfec5-carousel-title {
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: var(--tfec5-spacing-sm);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.tfec5-carousel-description {
    font-size: 1.4rem;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.tfec5-carousel-controls {
    position: absolute;
    bottom: var(--tfec5-spacing-md);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: var(--tfec5-spacing-xs);
}

.tfec5-carousel-indicator {
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.tfec5-carousel-indicator.tfec5-active {
    background: var(--tfec5-primary);
    transform: scale(1.2);
}

.tfec5-carousel-prev,
.tfec5-carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    cursor: pointer;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.tfec5-carousel-prev:hover,
.tfec5-carousel-next:hover {
    background: rgba(0, 0, 0, 0.7);
}

.tfec5-carousel-prev {
    left: var(--tfec5-spacing-md);
}

.tfec5-carousel-next {
    right: var(--tfec5-spacing-md);
}

/* Game Grid */
.tfec5-game-section {
    margin-bottom: var(--tfec5-spacing-xl);
}

.tfec5-section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--tfec5-primary);
    margin-bottom: var(--tfec5-spacing-lg);
    text-align: center;
    position: relative;
}

.tfec5-section-title::after {
    content: '';
    position: absolute;
    bottom: -0.8rem;
    left: 50%;
    transform: translateX(-50%);
    width: 6rem;
    height: 0.3rem;
    background: linear-gradient(135deg, var(--tfec5-primary) 0%, var(--tfec5-hover) 100%);
    border-radius: var(--tfec5-radius-full);
}

.tfec5-game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
    gap: var(--tfec5-spacing-md);
    margin-bottom: var(--tfec5-spacing-lg);
}

.tfec5-game-card {
    background: linear-gradient(135deg, var(--tfec5-gray) 0%, var(--tfec5-dark) 100%);
    border-radius: var(--tfec5-radius-md);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.tfec5-game-card:hover {
    transform: translateY(-2px);
    border-color: var(--tfec5-primary);
    box-shadow: var(--tfec5-shadow-lg);
}

.tfec5-game-image {
    width: 100%;
    height: 8rem;
    object-fit: cover;
    background: linear-gradient(135deg, var(--tfec5-primary) 0%, var(--tfec5-hover) 100%);
}

.tfec5-game-name {
    padding: var(--tfec5-spacing-sm);
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    color: var(--tfec5-text);
    line-height: 1.3;
    min-height: 3.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Content Modules */
.tfec5-content-module {
    background: linear-gradient(135deg, var(--tfec5-gray) 0%, var(--tfec5-dark) 100%);
    border-radius: var(--tfec5-radius-lg);
    padding: var(--tfec5-spacing-lg);
    margin-bottom: var(--tfec5-spacing-xl);
    border: 1px solid var(--tfec5-border);
    box-shadow: var(--tfec5-shadow-md);
}

.tfec5-module-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--tfec5-primary);
    margin-bottom: var(--tfec5-spacing-md);
    display: flex;
    align-items: center;
    gap: var(--tfec5-spacing-sm);
}

.tfec5-module-content {
    color: var(--tfec5-text-secondary);
    line-height: 1.6;
}

.tfec5-module-content p {
    margin-bottom: var(--tfec5-spacing-md);
}

.tfec5-module-content a {
    color: var(--tfec5-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.tfec5-module-content a:hover {
    color: var(--tfec5-hover);
    text-decoration: underline;
}

/* Footer */
.tfec5-footer {
    background: linear-gradient(135deg, var(--tfec5-dark) 0%, var(--tfec5-gray) 100%);
    border-top: 1px solid var(--tfec5-border);
    padding: var(--tfec5-spacing-xl) 0 var(--tfec5-spacing-lg);
    margin-top: var(--tfec5-spacing-xl);
}

.tfec5-footer-content {
    margin-bottom: var(--tfec5-spacing-lg);
}

.tfec5-footer-section {
    margin-bottom: var(--tfec5-spacing-lg);
}

.tfec5-footer-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--tfec5-primary);
    margin-bottom: var(--tfec5-spacing-md);
}

.tfec5-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--tfec5-spacing-md);
    margin-bottom: var(--tfec5-spacing-md);
}

.tfec5-footer-link {
    color: var(--tfec5-text-secondary);
    text-decoration: none;
    font-size: 1.3rem;
    transition: color 0.3s ease;
}

.tfec5-footer-link:hover {
    color: var(--tfec5-primary);
}

.tfec5-partners {
    display: flex;
    flex-wrap: wrap;
    gap: var(--tfec5-spacing-md);
    justify-content: center;
    margin-bottom: var(--tfec5-spacing-lg);
}

.tfec5-partner {
    width: 4rem;
    height: 4rem;
    object-fit: contain;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.tfec5-partner:hover {
    opacity: 1;
}

.tfec5-copyright {
    text-align: center;
    color: var(--tfec5-text-secondary);
    font-size: 1.2rem;
    padding-top: var(--tfec5-spacing-lg);
    border-top: 1px solid var(--tfec5-border);
}

/* Bottom Navigation */
.tfec5-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--tfec5-bottom-nav-height);
    background: linear-gradient(135deg, var(--tfec5-dark) 0%, var(--tfec5-gray) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--tfec5-border);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: var(--tfec5-spacing-sm) 0;
}

.tfec5-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 6rem;
    min-height: 5.2rem;
    text-decoration: none;
    color: var(--tfec5-text-secondary);
    transition: all 0.3s ease;
    border-radius: var(--tfec5-radius-md);
    padding: var(--tfec5-spacing-xs);
}

.tfec5-bottom-nav-item:hover {
    color: var(--tfec5-primary);
    background-color: rgba(38, 166, 154, 0.1);
    transform: translateY(-1px);
}

.tfec5-bottom-nav-item.tfec5-active {
    color: var(--tfec5-primary);
    background-color: rgba(38, 166, 154, 0.2);
}

.tfec5-bottom-nav-icon {
    font-size: 2.4rem;
    margin-bottom: var(--tfec5-spacing-xs);
    transition: transform 0.3s ease;
}

.tfec5-bottom-nav-item:hover .tfec5-bottom-nav-icon {
    transform: scale(1.1);
}

.tfec5-bottom-nav-label {
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tfec5-menu-toggle {
        display: block;
    }

    .tfec5-header-actions {
        display: none;
    }

    .tfec5-main-content {
        padding-bottom: calc(var(--tfec5-bottom-nav-height) + var(--tfec5-spacing-xl));
    }

    .tfec5-carousel {
        height: 16rem;
    }

    .tfec5-carousel-title {
        font-size: 2rem;
    }

    .tfec5-carousel-description {
        font-size: 1.2rem;
    }

    .tfec5-game-grid {
        grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
        gap: var(--tfec5-spacing-sm);
    }

    .tfec5-game-image {
        height: 7rem;
    }

    .tfec5-content-module {
        padding: var(--tfec5-spacing-md);
    }

    .tfec5-footer-links {
        justify-content: center;
    }

    .tfec5-partners {
        gap: var(--tfec5-spacing-sm);
    }

    .tfec5-partner {
        width: 3.2rem;
        height: 3.2rem;
    }
}

@media (min-width: 769px) {
    .tfec5-bottom-nav {
        display: none;
    }

    .tfec5-main-content {
        padding-bottom: var(--tfec5-spacing-xl);
    }
}

/* Animation Classes */
.tfec5-fade-in {
    animation: tfec5FadeIn 0.6s ease-out;
}

.tfec5-slide-up {
    animation: tfec5SlideUp 0.6s ease-out;
}

.tfec5-scale-in {
    animation: tfec5ScaleIn 0.4s ease-out;
}

@keyframes tfec5FadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes tfec5SlideUp {
    from {
        opacity: 0;
        transform: translateY(2rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes tfec5ScaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
.tfec5-btn:focus,
.tfec5-menu-toggle:focus,
.tfec5-menu-item:focus,
.tfec5-bottom-nav-item:focus {
    outline: 2px solid var(--tfec5-primary);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --tfec5-bg: #000000;
        --tfec5-text: #ffffff;
        --tfec5-border: #ffffff;
    }
}