/*
Theme Name: Total Battle K268
Theme URI: https://totalbattle-k268.com
Author: K268 Team
Author URI: https://totalbattle-k268.com
Description: A modern and beautiful WordPress theme for Total Battle Kingdom 268. Features kingdom information, news updates, and a responsive design optimized for gaming communities.
Version: 1.0.0
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: totalbattle-k268
Tags: gaming, community, responsive, modern, custom-background, custom-logo

This theme, like WordPress, is licensed under the GPL.
*/

/* ===================================
   CSS Reset & Base Styles
   =================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

    :root {
        /* Color Palette - Dark Blue & Gold Theme */
        --primary-color: #c9a865;
        --primary-dark: #a68745;
        --secondary-color: #0f1629;
        --accent-color: #d4af37;
        --bg-dark: #0a0e1a;
        --bg-medium: #151b2e;
        --bg-light: #1e2841;
        --text-light: #f5f5f5;
        --text-muted: #b8b8b8;
        --border-color: #2a3b5a;
        --success-color: #4caf50;
        --warning-color: #ff9800;
        --danger-color: #f44336;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-light);
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--secondary-color) 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

/* ===================================
   Typography
   =================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--primary-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-color);
}

/* ===================================
   Layout
   =================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 60px 0;
}

/* ===================================
   Header Styles
   =================================== */

.site-header {
    background: linear-gradient(to bottom, rgba(15, 22, 41, 0.95), rgba(10, 14, 26, 0.98));
    backdrop-filter: blur(10px);
    padding: 20px 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--primary-color);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.site-logo h1 {
    font-size: 2rem;
    margin: 0;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-logo-img {
    height: 70px;
    width: 70px;
    display: block;
    object-fit: contain;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.site-logo .logo-link:hover .site-logo-img {
    transform: scale(1.05);
    filter: brightness(1.2);
}

.site-logo .kingdom-badge {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 1rem;
    box-shadow: var(--shadow-sm);
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
}

.main-navigation a {
    color: var(--text-light);
    font-weight: 500;
    padding: 10px 15px;
    border-radius: 5px;
    transition: all var(--transition-fast);
}

.main-navigation a:hover {
    background: rgba(201, 168, 101, 0.2);
    color: var(--accent-color);
}

/* ===================================
   Language Selector
   =================================== */

.language-selector {
    position: relative;
    z-index: 100;
}

.language-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(30, 40, 65, 0.6);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 0.9rem;
    font-weight: 500;
}

.language-btn:hover {
    background: rgba(30, 40, 65, 0.8);
    border-color: var(--primary-color);
}

.language-icon {
    font-size: 1.2rem;
}

.current-lang {
    font-weight: 600;
    color: var(--primary-color);
}

.dropdown-arrow {
    font-size: 0.7rem;
    transition: transform var(--transition-fast);
}

.language-btn.active .dropdown-arrow {
    transform: rotate(180deg);
}

.language-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: rgba(21, 27, 46, 0.98);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    min-width: 180px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-normal);
    backdrop-filter: blur(10px);
}

.language-selector.active .language-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: var(--text-light);
    text-decoration: none;
    transition: all var(--transition-fast);
    border-bottom: 1px solid var(--border-color);
}

.lang-option:last-child {
    border-bottom: none;
}

.lang-option:hover {
    background: rgba(30, 40, 65, 0.8);
    color: var(--primary-color);
    padding-left: 20px;
}

.lang-option.active {
    background: rgba(201, 168, 101, 0.15);
    color: var(--accent-color);
}

.lang-option .flag {
    font-size: 1.3rem;
}

.lang-option span:last-child {
    font-size: 0.95rem;
    font-weight: 500;
}

/* ===================================
   Hero Section
   =================================== */

.hero-section {
    background: linear-gradient(135deg, rgba(15, 22, 41, 0.9), rgba(10, 14, 26, 0.95)),
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><rect fill="%230f1629" width="1200" height="600"/></svg>');
    background-size: cover;
    background-position: center;
    padding: 100px 0;
    text-align: center;
    border-bottom: 3px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(201, 168, 101, 0.1), transparent 70%);
    pointer-events: none;
}

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

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 3px;
    animation: fadeInDown 0.8s ease;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 30px;
    animation: fadeInUp 0.8s ease;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.stat-item {
    background: rgba(30, 40, 65, 0.6);
    backdrop-filter: blur(10px);
    padding: 20px 30px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal);
}

.stat-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-color);
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===================================
   Content Sections
   =================================== */

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.content-card {
    background: rgba(30, 40, 65, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.content-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.card-icon {
    font-size: 2rem;
    color: var(--accent-color);
}

.card-title {
    font-size: 1.5rem;
    margin: 0;
}

.card-content {
    color: var(--text-muted);
    line-height: 1.8;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-content > a.btn,
.card-content > a[href] {
    margin-top: auto !important;
    align-self: flex-start;
}

/* ===================================
   News Section
   =================================== */

.news-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 30px;
}

.news-item {
    background: rgba(30, 40, 65, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 25px;
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.news-item:hover {
    transform: translateX(5px);
    border-left-color: var(--accent-color);
    box-shadow: var(--shadow-lg);
}

.news-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.news-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

.news-category {
    background: var(--primary-dark);
    padding: 3px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.news-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.news-excerpt {
    color: var(--text-muted);
    line-height: 1.6;
}

/* ===================================
   Footer
   =================================== */

.site-footer {
    background: rgba(10, 14, 26, 0.95);
    padding: 40px 0 20px;
    margin-top: 60px;
    border-top: 2px solid var(--primary-color);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-bottom p {
    margin: 8px 0;
}

.footer-links {
    margin-top: 10px;
}

.footer-links a {
    color: var(--primary-color);
    text-decoration: none;
    padding: 0 10px;
    border-right: 1px solid var(--border-color);
    transition: color 0.3s ease;
}

.footer-links a:last-child {
    border-right: none;
}

.footer-links a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* ===================================
   Buttons
   =================================== */

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all var(--transition-normal);
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--bg-dark);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--bg-dark);
}

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

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

/* ===================================
   Animations
   =================================== */

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

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 768px) {
    .site-logo-img {
        height: 50px;
        width: 50px;
    }
    
    .site-header .container {
        flex-direction: row;
        gap: 15px;
        flex-wrap: nowrap;
        align-items: center;
    }
    
    .site-logo {
        flex-shrink: 0;
    }
    
    .mobile-menu-toggle {
        flex-shrink: 0;
        margin-left: auto;
        align-self: center;
    }
    
    .language-selector {
        flex-shrink: 0;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .language-dropdown {
        right: 0;
        left: auto;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    /* Button Optimization - Larger Touch Targets */
    .btn, .btn-primary, .btn-secondary {
        padding: 14px 28px;
        font-size: 1rem;
        min-height: 48px;
    }
    
    /* CTA Buttons Container */
    .cta-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 15px;
        justify-content: center;
        align-items: center;
    }
    
    .cta-buttons .btn {
        margin: 0;
    }
    
    /* Royal Button Special Styling */
    .royal-btn {
        background: linear-gradient(135deg, var(--primary-color), #d4af37) !important;
        box-shadow: 0 4px 15px rgba(201, 168, 101, 0.4) !important;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-section {
        padding: 60px 0;
    }
    
    .section {
        padding: 40px 0;
    }
    
    .site-logo-img {
        height: 45px;
        width: 45px;
    }
    
    .site-logo h1 {
        font-size: 1.5rem;
    }
    
    /* Buttons - Full Width on Small Screens */
    .btn, .btn-primary, .btn-secondary {
        padding: 12px 24px;
        font-size: 0.95rem;
        width: 100%;
        max-width: 100%;
    }
    
    /* CTA Buttons - Stack Vertically */
    .cta-buttons {
        flex-direction: column;
        width: 100%;
        gap: 15px;
    }
    
    .cta-buttons .btn {
        width: 100%;
        margin: 0;
    }
}

/* ===================================
   Scroll to Top Button
   =================================== */

.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--bg-dark);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    z-index: 999;
    transition: all var(--transition-normal);
    display: none;
}

.scroll-to-top:hover {
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* ===================================
   Mobile Menu Toggle
   =================================== */

.mobile-menu-toggle {
    display: none;
    background: var(--primary-color);
    color: var(--bg-dark);
    border: none;
    padding: 10px 20px;
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 5px;
    transition: background var(--transition-fast);
}

.mobile-menu-toggle:hover {
    background: var(--accent-color);
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
        margin-bottom: 15px;
    }
    
    .main-navigation .menu {
        display: none;
    }
}

/* ===================================
   Loading State for Buttons
   =================================== */

.btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid var(--bg-dark);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

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

/* ===================================
   Utility Classes
   =================================== */

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

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

.fade-in {
    animation: fadeIn 0.6s ease;
}

/* Hide Google Translate bar */
.goog-te-banner-frame.skiptranslate {
    display: none !important;
}

body {
    top: 0 !important;
}

/* ===================================
   Translation Styles
   =================================== */

/* Translation notification */
.translation-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--bg-dark);
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    font-weight: 600;
    z-index: 9999;
    opacity: 0;
    transform: translateX(100px);
    transition: all var(--transition-normal);
}

.translation-notification.show {
    opacity: 1;
    transform: translateX(0);
}

/* Hide Google Translate UI elements */
#google_translate_element {
    display: none !important;
}

.goog-te-banner-frame,
.goog-te-balloon-frame,
.goog-tooltip,
.skiptranslate,
.goog-te-gadget {
    display: none !important;
}

iframe.goog-te-banner-frame,
iframe.goog-te-menu-frame {
    display: none !important;
}

body {
    top: 0 !important;
}

@media (max-width: 768px) {
    .translation-notification {
        top: 70px;
        right: 10px;
        left: 10px;
        text-align: center;
    }
}
