/**
 * K8 Theme Custom Styles
 * 
 * @package K8_Theme
 */

/* ============================================
   BASE STYLES
   ============================================ */

:root {
    --primary-color: #1a1a2e;
    --secondary-color: #16213e;
    --accent-color: #ffd700;
    --accent-hover: #ffed4e;
    --text-color: #333;
    --text-light: #666;
    --text-white: #fff;
    --bg-light: #f5f5f5;
    --bg-white: #fff;
    --border-color: #e0e0e0;
    --shadow: 0 5px 20px rgba(0,0,0,0.1);
    --shadow-hover: 0 15px 40px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.animate-fadeIn {
    animation: fadeIn 0.6s ease forwards;
}

.animate-slideIn {
    animation: slideIn 0.6s ease forwards;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

.site-header {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(26, 26, 46, 0.95);
}

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

.main-navigation {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
}

.nav-menu a {
    position: relative;
    overflow: hidden;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-menu a:hover::after {
    width: 80%;
}

.auth-buttons {
    display: flex;
    gap: 15px;
}

/* ============================================
   HERO ENHANCEMENTS
   ============================================ */

.hero-section {
    position: relative;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to top, rgba(245,245,245,1), transparent);
    z-index: 1;
}

.hero-content {
    animation: fadeIn 0.8s ease forwards;
}

.hero-title {
    background: linear-gradient(135deg, var(--accent-color) 0%, #fff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-cta .btn {
    animation: pulse 2s infinite;
}

.hero-cta .btn-secondary {
    animation: none;
}

/* ============================================
   FEATURE CARDS ENHANCEMENTS
   ============================================ */

.feature-card {
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,215,0,0.1), transparent);
    transition: var(--transition);
}

.feature-card:hover::before {
    left: 100%;
}

.feature-icon {
    transition: var(--transition);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

/* ============================================
   GAME CARDS ENHANCEMENTS
   ============================================ */

.game-card {
    position: relative;
}

.game-card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--accent-color), transparent, var(--accent-color));
    border-radius: 17px;
    z-index: -1;
    opacity: 0;
    transition: var(--transition);
}

.game-card:hover::after {
    opacity: 1;
}

/* ============================================
   STEPS ENHANCEMENTS
   ============================================ */

.step-item {
    position: relative;
}

.step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 30px;
    right: -15px;
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-color), transparent);
}

@media (max-width: 768px) {
    .step-item:not(:last-child)::after {
        display: none;
    }
}

.step-number {
    position: relative;
    z-index: 1;
}

.step-number::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: var(--accent-color);
    border-radius: 50%;
    opacity: 0.3;
    z-index: -1;
    animation: pulse 2s infinite;
}

/* ============================================
   FAQ ENHANCEMENTS
   ============================================ */

.faq-item {
    transition: var(--transition);
}

.faq-item:hover {
    transform: translateX(5px);
}

.faq-question {
    position: relative;
}

.faq-icon {
    transition: var(--transition);
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

/* ============================================
   PROMO CARDS ENHANCEMENTS
   ============================================ */

.promo-card {
    position: relative;
    overflow: hidden;
}

.promo-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255,215,0,0.1) 50%,
        transparent 70%
    );
    transform: rotate(45deg);
    transition: var(--transition);
    opacity: 0;
}

.promo-card:hover::before {
    animation: shine 0.8s ease forwards;
}

@keyframes shine {
    from {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
        opacity: 0;
    }
    to {
        transform: translateX(100%) translateY(100%) rotate(45deg);
        opacity: 1;
    }
}

.promo-bonus {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   CONTACT PAGE ENHANCEMENTS
   ============================================ */

.contact-item {
    transition: var(--transition);
}

.contact-item:hover {
    transform: translateX(10px);
}

.contact-icon {
    transition: var(--transition);
}

.contact-item:hover .contact-icon {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(255,215,0,0.4);
}

/* ============================================
   LOGIN FORM ENHANCEMENTS
   ============================================ */

.login-container {
    position: relative;
}

.login-container::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color), var(--accent-color));
    border-radius: 20px;
    z-index: -1;
    opacity: 0.5;
}

.form-input {
    transition: var(--transition);
}

.form-input:focus {
    box-shadow: 0 0 0 3px rgba(255,215,0,0.3);
}

.form-submit {
    position: relative;
    overflow: hidden;
}

.form-submit::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.form-submit:active::after {
    width: 300px;
    height: 300px;
}

/* ============================================
   BUTTON ENHANCEMENTS
   ============================================ */

.btn {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: var(--transition);
    z-index: -1;
}

.btn:hover::before {
    left: 100%;
}

/* ============================================
   FOOTER ENHANCEMENTS
   ============================================ */

.site-footer {
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--secondary-color), var(--accent-color));
}

.footer-links a {
    position: relative;
    display: inline-block;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-color);
    transition: var(--transition);
}

.footer-links a:hover::after {
    width: 100%;
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */

.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   LOADING ANIMATION
   ============================================ */

.loading {
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* ============================================
   SELECTION STYLES
   ============================================ */

::selection {
    background: var(--accent-color);
    color: var(--primary-color);
}

::-moz-selection {
    background: var(--accent-color);
    color: var(--primary-color);
}

/* ============================================
   MOBILE MENU ENHANCEMENTS
   ============================================ */

.menu-toggle {
    display: none;
    background: none;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    font-size: 24px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 5px;
    z-index: 1001;
    position: relative;
}

@media (max-width: 768px) {
    .header-inner {
        justify-content: flex-end;
    }
    
    .main-navigation {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(26, 26, 46, 0.98);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
        padding: 20px;
        overflow-y: auto;
        display: block;
        flex-direction: column;
    }
    
    .main-navigation.active {
        transform: translateX(0);
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 0;
        margin-bottom: 20px;
        width: 100%;
    }
    
    .nav-menu li {
        border-bottom: 1px solid rgba(255,255,255,0.1);
        width: 100%;
    }
    
    .nav-menu a {
        display: block;
        padding: 15px 0;
        font-size: 16px;
        color: #fff;
    }
    
    .nav-menu a:hover {
        color: var(--accent-color);
    }
    
    .auth-buttons {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    .auth-buttons .btn {
        width: 100%;
        text-align: center;
        display: block;
    }
    
    .menu-toggle {
        display: block;
        transition: var(--transition);
        order: 1;
    }
    
    .menu-toggle.active {
        transform: rotate(90deg);
    }
    
    body.menu-open {
        overflow: hidden;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .site-header,
    .site-footer,
    .hero-cta,
    .cta-section {
        display: none;
    }
    
    .page-content {
        padding: 0;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: var(--bg-light);
    clip: auto !important;
    clip-path: none;
    color: var(--text-color);
    display: block;
    font-size: 1em;
    height: auto;
    left: 5px;
    padding: 15px 23px 14px;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* Focus styles for accessibility */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

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

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

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

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mt-4 { margin-top: 40px; }
.mt-5 { margin-top: 50px; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
.mb-4 { margin-bottom: 40px; }
.mb-5 { margin-bottom: 50px; }

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

.clearfix::after {
    content: '';
    display: table;
    clear: both;
}
