        :root {
            --primary-dark: #121826;
            --secondary-dark: #1c2a44;
            --accent-gold: #ffd700;
            --accent-blue: #4d9de0;
            --accent-red: #e63946;
            --accent-green: #2a9d8f;
            --text-light: #f0f0f0;
            --text-muted: #a0aec0;
            --legend-color: #27ae60;
            --good-color: #2ecc71;
            --warning-color: #f39c12;
            --kickout-color: #e74c3c;
            --toxic-color: #8e44ad;
        }
        
        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }
        
        body {
            background: linear-gradient(135deg, var(--primary-dark), var(--secondary-dark));
            color: var(--text-light);
            font-family: 'Roboto', sans-serif;
            line-height: 1.6;
            min-height: 100vh;
            padding: 0;
            margin: 0;
            position: relative;
            overflow-x: hidden;
            background-attachment: fixed;
        }

    .orientation-warning {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    z-index: 1000;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.continue-btn {
    background: var(--accent-gold);
    color: var(--primary-dark);
    border: none;
    padding: 12px 25px;
    border-radius: 50px;
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.continue-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}


.orientation-warning i {
    font-size: 3rem;
    color: var(--accent-gold);
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

.orientation-warning h2 {
    color: var(--accent-gold);
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.orientation-warning p {
    color: var(--text-light);
    margin-bottom: 30px;
    max-width: 500px;
}

@media screen and (orientation:portrait) {
    .content {
        display: block !important;
    }
}

        
        /* Animated Background Elements */
        .background-elements {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: -1;
            overflow: hidden;
        }
        
        .element {
            position: absolute;
            border-radius: 50%;
            background: rgba(255, 215, 0, 0.1);
            animation: float 15s infinite linear;
        }
        
        .element:nth-child(1) { width: 80px; height: 80px; top: 10%; left: 5%; }
        .element:nth-child(2) { width: 120px; height: 120px; top: 30%; left: 80%; }
        .element:nth-child(3) { width: 60px; height: 60px; top: 70%; left: 15%; }
        .element:nth-child(4) { width: 100px; height: 100px; top: 50%; left: 90%; }
        .element:nth-child(5) { width: 40px; height: 40px; top: 85%; left: 70%; }
        
        @keyframes float {
            0% { transform: translateY(0) rotate(0deg); }
            50% { transform: translateY(-20px) rotate(180deg); }
            100% { transform: translateY(0) rotate(360deg); }
        }
        
        .container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 20px;
        }
        
        /* Header with Animation */
        header {
            background: rgba(18, 24, 38, 0.85);
            backdrop-filter: blur(10px);
            padding: 20px 0;
            text-align: center;
            margin-bottom: 30px;
            border-bottom: 3px solid var(--accent-gold);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
            position: relative;
            overflow: hidden;
        }
        
        header::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 3px;
            background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
            animation: headerGlow 3s infinite;
        }
        
        @keyframes headerGlow {
            0% { background-position: -100% 0; }
            100% { background-position: 200% 0; }
        }
        
        .clan-badge {
            width: 120px;
            height: 120px;
            background: linear-gradient(135deg, var(--secondary-dark), var(--primary-dark));
            border: 3px solid var(--accent-gold);
            border-radius: 50%;
            margin: 0 auto 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
            animation: pulse 4s infinite;
        }
        
        .clan-badge i {
            font-size: 50px;
            color: var(--accent-gold);
        }
        
        @keyframes pulse {
            0% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.3); }
            50% { box-shadow: 0 0 40px rgba(255, 215, 0, 0.6); }
            100% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.3); }
        }
        
        h1 {
            font-family: 'Orbitron', sans-serif;
            font-size: 2.8rem;
            font-weight: 900;
            margin: 0;
            text-transform: uppercase;
            letter-spacing: 3px;
            background: linear-gradient(to right, var(--accent-gold), var(--accent-blue));
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
            animation: textGlow 2s infinite alternate;
        }
        
        @keyframes textGlow {
            from { text-shadow: 0 0 10px rgba(255, 215, 0, 0.3); }
            to { text-shadow: 0 0 20px rgba(255, 215, 0, 0.6), 0 0 30px rgba(77, 157, 224, 0.4); }
        }
        
        .clan-subtitle {
            font-family: 'Orbitron', sans-serif;
            font-size: 1.5rem;
            color: var(--accent-blue);
            margin-top: 10px;
            letter-spacing: 2px;
        }
        
        .powered-by {
            font-family: 'Orbitron', sans-serif;
            font-size: 1.2rem;
            color: var(--accent-gold);
            margin-top: 5px;
            letter-spacing: 1px;
        }
        
        /* Navigation Buttons */
        .nav-buttons {
            display: flex;
            gap: 20px;
            margin: 30px 0;
            justify-content: center;
        }
        
        .nav-button {
            background: linear-gradient(135deg, var(--secondary-dark), var(--primary-dark));
            color: var(--text-light);
            border: 2px solid var(--accent-gold);
            padding: 15px 30px;
            border-radius: 50px;
            cursor: pointer;
            font-family: 'Orbitron', sans-serif;
            font-size: 1.1rem;
            text-align: center;
            min-width: 220px;
            letter-spacing: 1px;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
            z-index: 1;
        }
        
        .nav-button::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.3), transparent);
            transition: 0.5s;
            z-index: -1;
        }
        
        .nav-button:hover::before {
            left: 100%;
        }
        
        .nav-button:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
        }
        
        .nav-button.active {
            background: linear-gradient(135deg, var(--accent-gold), #d4af37);
            color: var(--primary-dark);
            font-weight: bold;
            border-color: var(--accent-gold);
            box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
        }
        
        /* Tab Content */
        .tab-content {
            display: none;
            animation: fadeIn 0.5s ease;
        }
        
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        .tab-content.active {
            display: block;
        }
        
        /* Summary Card */
        .summary-card {
            background: rgba(28, 42, 68, 0.7);
            backdrop-filter: blur(10px);
            border-radius: 15px;
            padding: 25px;
            margin-bottom: 30px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
            border: 1px solid rgba(255, 215, 0, 0.2);
        }
        
        .summary-card h3 {
            font-family: 'Orbitron', sans-serif;
            color: var(--accent-gold);
            font-size: 1.8rem;
            margin-bottom: 20px;
            text-align: center;
            letter-spacing: 1px;
        }
        
        /* ======== Summary Card & Stats ======== */
.summary-card {
    background: rgba(28, 42, 68, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.summary-card h3 {
    font-family: 'Orbitron', sans-serif;
    color: var(--accent-gold);
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-align: center;
    letter-spacing: 1px;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px;
}

.stat-item {
    text-align: center;
    padding: 15px 10px;
    background: rgba(18, 24, 38, 0.6);
    border-radius: 10px;
    border: 1px solid rgba(255, 215, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100px;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: bold;
    color: var(--accent-gold);
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 5px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    word-break: break-word;
    text-align: center;
}

.stat-label {
    font-size: 0.95rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Make the first stat-item (Opponent) wider if needed */
.stat-item:first-child {
    grid-column: span 2;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .stat-value {
        font-size: 1.2rem;
    }
    .stat-item:first-child {
        grid-column: span 1;
    }
    .summary-stats {
        gap: 10px;
    }
}
        
        /* Filter Controls */
        .filter-controls {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-bottom: 20px;
            align-items: center;
            background: rgba(28, 42, 68, 0.7);
            padding: 20px;
            border-radius: 15px;
            border: 1px solid rgba(255, 215, 0, 0.2);
        }

        .filter-controls select, .filter-controls input {
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid var(--accent-gold);
    background: rgba(18, 24, 38, 0.8);
    color: white;
}
        
        .filter-controls input, .filter-controls select {
            padding: 12px 20px;
            border: 1px solid rgba(255, 215, 0, 0.3);
            border-radius: 8px;
            flex-grow: 1;
            min-width: 150px;
            background: rgba(18, 24, 38, 0.8);
            color: var(--text-light);
            font-size: 1rem;
            transition: all 0.3s ease;
        }
        
        .filter-controls input:focus, .filter-controls select:focus {
            outline: none;
            border-color: var(--accent-gold);
            box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
        }
        
        .filter-controls button {
            background: var(--accent-gold);;
            color: var(--primary-dark);
            border: none;
            padding: 8px 16px;
            border-radius: 8px;
            cursor: pointer;
            font-family: 'Orbitron', sans-serif;
            font-weight: bold;
            font-size: 1rem;
            letter-spacing: 1px;
            transition: all 0.3s ease;
        }
        
        .filter-controls button:hover {
            transform: translateY(-3px);
            box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
        }
        
        /* Table Container */
        .table-container {
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            margin-bottom: 40px;
            background: rgba(28, 42, 68, 0.7);
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
            border: 1px solid rgba(255, 215, 0, 0.2);
            backdrop-filter: blur(10px);
            padding: 20px;
        }
        
        /* War Selector */
        .report-selector {
            margin: 25px 0;
            position: relative;
            display: inline-block;
            width: 100%;
            max-width: 400px;
        }
        
        .report-selector select {
            width: 100%;
            padding: 14px 25px;
            border: 1px solid rgba(255, 215, 0, 0.3);
            border-radius: 8px;
            background: rgba(18, 24, 38, 0.8);
            color: var(--text-light);
            font-size: 1.1rem;
            cursor: pointer;
            appearance: none;
            -webkit-appearance: none;
            -moz-appearance: none;
            background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffd700' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
            background-repeat: no-repeat;
            background-position: right 15px center;
            background-size: 20px;
            transition: all 0.3s ease;
        }
        
        .report-selector select:focus {
            outline: none;
            border-color: var(--accent-gold);
            box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
        }
        
        /* Tables */
        table {
            width: 100%;
            border-collapse: separate;
            border-spacing: 0;
            min-width: 1000px;
        }
        
        th, td {
            padding: 16px 12px;
            text-align: left;
            border-bottom: 1px solid rgba(255, 215, 0, 0.1);
        }
        
        th {
            background: rgba(255, 215, 0, 0.1);
            color: var(--accent-gold);
            font-family: 'Orbitron', sans-serif;
            font-weight: 700;
            letter-spacing: 1px;
            position: sticky;
            top: 0;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        th:hover {
            background: rgba(255, 215, 0, 0.2);
        }
        
        tr {
            transition: all 0.3s ease;
        }
        
        tr:nth-child(even) {
            background: rgba(18, 24, 38, 0.4);
        }
        
        tr:hover {
            background: rgba(255, 215, 0, 0.05);
            transform: translateX(5px);
        }
        
        /* Result classes */
        .result-Excellent {
            color: var(--legend-color);
            font-weight: bold;
        }
        
        .result-good {
            color: var(--good-color);
            font-weight: bold;
        }
        
        .result-warning {
            color: var(--warning-color);
            font-weight: bold;
        }
        
        .result-kickout {
            color: var(--kickout-color);
            font-weight: bold;
        }
        
        .result-toxic {
            color: var(--toxic-color);
            font-weight: bold;
        }
        
        .result-icon {
            margin-right: 8px;
            font-size: 1.2em;
        }
        
        /* Stars */
        .stars {
            color: var(--accent-gold);
            font-weight: bold;
            letter-spacing: 3px;
        }
        
        .percent {
            font-weight: bold;
        }
        
        .good {
            color: var(--good-color);
        }
        
        .average {
            color: var(--warning-color);
        }
        
        .poor {
            color: var(--kickout-color);
        }
        
        /* Footer */
        .footer {
            background: rgba(18, 24, 38, 0.85);
            color: var(--text-muted);
            text-align: center;
            padding: 25px 0;
            font-size: 1rem;
            border-top: 1px solid rgba(255, 215, 0, 0.1);
            margin-top: 40px;
        }
        
        .powered-by {
            font-weight: bold;
            color: var(--accent-gold);
            font-family: 'Orbitron', sans-serif;
            font-size: 1.2rem;
            letter-spacing: 1px;
            margin-bottom: 10px;
        }
        
        /* Loading Spinner */
        .loader {
            display: none;
            text-align: center;
            padding: 40px;
        }
        
        .loader i {
            font-size: 3rem;
            color: var(--accent-gold);
            animation: spin 1s linear infinite;
        }
        
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        
        /* Mobile Optimizations */
        @media (max-width: 768px) {
            .container {
                padding: 15px;
            }
            
            h1 {
                font-size: 2.2rem;
            }
            
            .clan-subtitle {
                font-size: 1.2rem;
            }
            
            .nav-buttons {
                flex-direction: column;
                gap: 15px;
            }
            
            .nav-button {
                min-width: auto;
                width: 100%;
            }
            
            .stat-item {
                padding: 15px;
            }
            
            .stat-value {
                font-size: 2rem;
            }
            
            .filter-controls {
                flex-direction: column;
                align-items: stretch;
            }
            
            .table-container {
                padding: 15px;
            }
            
            table {
                min-width: 100%;
            }
            
            th, td {
                padding: 14px 8px;
                font-size: 0.95rem;
            }
        }

@media (max-width: 768px) {
    .result-label {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        line-height: 1.2;
    }
    
    .result-label .emoji {
        font-size: 1.5em;
        margin-bottom: 2px;
    }
    
    .result-label .text {
        white-space: nowrap;
    }
}
        
        @media (max-width: 480px) {
            h1 {
                font-size: 1.8rem;
            }
            
            .clan-badge {
                width: 90px;
                height: 90px;
            }
            
            .clan-badge i {
                font-size: 35px;
            }
            
            .stat-value {
                font-size: 1.8rem;
            }
            
            .report-selector select {
                padding: 12px 20px;
                font-size: 1rem;
            }
        }

.membership-status {
    display: inline-block;
    margin-right: 8px;
    font-size: 0.8em;
}
.membership-status.active {
    color: var(--accent-green);
}
.membership-status.inactive {
    color: var(--accent-red);
}

.refresh-btn {
    background: var(--accent-gold);
    color: var(--primary-dark);
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}
.refresh-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255,215,0,0.4);
}
.flex-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.attacking-animation {
    display: inline-block;
    animation: axeHit 0.6s ease-in-out 3;
    color: #ff4444;
}
@keyframes axeHit {
    0%, 100% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(-30deg) scale(1.2); }
}

.opponent-stat {
    grid-column: span 2;   /* gives the opponent card more room */
}
.opponent-lines {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}
.opponent-lines .clan-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--accent-gold);
    text-shadow: 0 0 10px rgba(255,215,0,0.5);
    letter-spacing: 1px;
}
.opponent-lines .vs-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 900;
    color: var(--accent-red);
    text-shadow: 0 0 8px rgba(230,57,70,0.5);
    line-height: 1;
}
.opponent-lines .opponent-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffe484;
    text-shadow: 0 0 8px rgba(255,215,0,0.3);
    word-break: break-word;
    text-align: center;
}