/* Reset & Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Trader Filter Dropdown */
.trader-filter {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
    padding: 0.5rem;
}

.trader-filter-select {
    padding: 0.5rem 1rem;
    background: rgba(255, 215, 0, 0.1);
    color: var(--text);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
    min-width: 200px;
    backdrop-filter: blur(10px);
    position: relative;
}

.trader-filter-select:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: var(--gold);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.trader-filter-select:focus {
    outline: none;
    background: rgba(255, 215, 0, 0.2);
    border-color: var(--gold);
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.4);
}

.trader-filter-select option {
    background: var(--black);
    color: var(--text);
    padding: 0.5rem;
}

/* Legacy filter buttons (for dynamic creation) */
.filter-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 215, 0, 0.1);
    color: var(--text);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.2), transparent);
    transition: left 0.5s ease;
}

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

.filter-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: var(--gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--black);
    border-color: var(--gold);
    font-weight: bold;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.4);
}

.filter-btn.active:hover {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(255, 215, 0, 0.5);
}

:root {
    --gold: #FFD700;
    --gold-dark: #B8860B;
    --gold-light: #FFF8DC;
    --blue: #1E90FF;
    --blue-dark: #0066CC;
    --black: #000000;
    --black-light: #1a1a1a;
    --black-medium: #0d0d0d;
    --card-bg: #141414;
    --text: #ffffff;
    --text-dim: #b0b0b0;
    --success: #32CD32;
    --danger: #FF4444;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--black) 0%, var(--black-light) 50%, var(--black-medium) 100%);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Header */
header {
    background: linear-gradient(90deg, rgba(0,0,0,0.95) 0%, rgba(26,26,26,0.95) 100%);
    backdrop-filter: blur(10px);
    padding: 1rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(255, 215, 0, 0.1);
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: white;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Language Selector Mobile */
.language-selector-mobile {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.75rem;
    border-top: 1px solid rgba(255, 215, 0, 0.2);
    margin-top: 1rem;
}

.lang-buttons {
    display: flex;
    gap: 0.5rem;
}

.lang-btn-mobile {
    padding: 0.4rem 0.8rem;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 50px;
    text-align: center;
}

.lang-btn-mobile:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: var(--gold);
}

.lang-btn-mobile.active {
    background: var(--gold);
    color: var(--black);
    border-color: var(--gold);
    font-weight: bold;
}

#authStatus {
    padding: 0.25rem 0.5rem;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid var(--gold);
    border-radius: 4px;
    font-size: 0.7rem;
    color: var(--gold);
}

/* Burger Menu */
.burger {
    width: 30px;
    height: 25px;
    cursor: pointer;
    position: relative;
    z-index: 1001;
}

.burger span {
    display: block;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    border-radius: 3px;
    position: absolute;
    transition: all 0.3s ease;
}

.burger span:nth-child(1) { top: 0; }
.burger span:nth-child(2) { top: 11px; }
.burger span:nth-child(3) { bottom: 0; }

.burger.active span:nth-child(1) {
    transform: rotate(45deg);
    top: 11px;
}

.burger.active span:nth-child(2) {
    opacity: 0;
}

.burger.active span:nth-child(3) {
    transform: rotate(-45deg);
    bottom: 11px;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: linear-gradient(180deg, var(--black-light) 0%, var(--black) 100%);
    padding: 5rem 2rem 2rem;
    transition: right 0.3s ease;
    z-index: 999;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.8);
    border-left: 1px solid rgba(255, 215, 0, 0.2);
}

.mobile-menu.active {
    right: 0;
}

.menu-item {
    display: block;
    padding: 1rem;
    margin: 0.5rem 0;
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.05), rgba(30, 144, 255, 0.05));
    border-radius: 10px;
    color: var(--text);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    cursor: pointer;
}

.menu-item:hover,
.menu-item.active {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.15), rgba(30, 144, 255, 0.1));
    border-color: var(--gold);
    transform: translateX(-5px);
}

.menu-item-icon {
    margin-right: 0.5rem;
}

/* Main Content */
main {
    padding: 5rem 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.section.active {
    display: block;
}

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

/* Trade Cards */
.trader-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 215, 0, 0.15);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.trader-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), var(--blue), var(--gold));
    animation: shimmer 8s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.trader-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.trader-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--black);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.trader-info h3 {
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
    font-size: 1.2rem;
}

.trader-stats {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.trader-stats span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.trade-item {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.5), rgba(30, 144, 255, 0.05));
    padding: 1rem;
    border-radius: 10px;
    margin-top: 0.75rem;
    border-left: 3px solid var(--gold);
    transition: all 0.3s ease;
}

.trade-item:hover {
    transform: translateX(5px);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

.trade-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.trade-info {
    flex: 1;
}

.trade-asset {
    font-weight: bold;
    color: var(--text);
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}

.trade-details {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
}

.trade-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
}

.status-long {
    background: linear-gradient(90deg, rgba(50, 205, 50, 0.2), rgba(50, 205, 50, 0.1));
    color: var(--success);
    border: 1px solid var(--success);
}

.status-short {
    background: linear-gradient(90deg, rgba(255, 68, 68, 0.2), rgba(255, 68, 68, 0.1));
    color: var(--danger);
    border: 1px solid var(--danger);
}

.status-limit, .status-pending {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.1));
    color: var(--gold);
    border: 1px solid var(--gold);
}

.telegram-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: linear-gradient(90deg, rgba(30, 144, 255, 0.2), rgba(30, 144, 255, 0.1));
    border: 1px solid var(--blue);
    border-radius: 20px;
    color: var(--blue);
    text-decoration: none;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.telegram-link:hover {
    background: var(--blue);
    color: white;
    transform: scale(1.05);
}

/* Forms */
.login-form {
    max-width: 400px;
    margin: 2rem auto;
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--gold);
    font-weight: bold;
}

.form-input, .form-select {
    width: 100%;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    color: var(--text);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

.button-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.toggle-button {
    flex: 1;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    color: var(--text-dim);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-button:hover {
    border-color: var(--gold);
}

.toggle-button.active-long {
    background: linear-gradient(90deg, rgba(50, 205, 50, 0.3), rgba(50, 205, 50, 0.1));
    color: var(--success);
    border-color: var(--success);
}

.toggle-button.active-short {
    background: linear-gradient(90deg, rgba(255, 68, 68, 0.3), rgba(255, 68, 68, 0.1));
    color: var(--danger);
    border-color: var(--danger);
}

.submit-button, .action-button {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(90deg, var(--gold), var(--gold-dark));
    color: var(--black);
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-button:hover, .action-button:hover {
    transform: scale(1.02);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
}

.logout-button {
    background: linear-gradient(90deg, var(--danger), #CC0000);
    color: white;
    margin-top: 1rem;
}

/* Admin Dashboard */
.admin-dashboard {
    padding: 1rem;
}

.trade-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.action-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.btn-activate {
    background: var(--success);
    color: white;
}

.btn-close {
    background: var(--danger);
    color: white;
}

.btn-activate:hover, .btn-close:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

/* Section Headers */
.section-header {
    margin-bottom: 2rem;
    text-align: center;
}

.section-title {
    font-size: 2rem;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.section-subtitle {
    color: var(--text-dim);
}

/* Super Admin Panel */
.super-admin-panel {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    border: 2px solid var(--gold);
}

.trader-management-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.5);
    margin: 0.5rem 0;
    border-radius: 8px;
}

.trader-management-item span {
    color: var(--text);
    font-weight: 500;
}



/* Leaderboard */
.leaderboard-item {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid rgba(255, 215, 0, 0.15);
    transition: all 0.3s ease;
}

.leaderboard-item:hover {
    transform: translateX(5px);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
}

.rank {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--black);
}

.rank-1 { 
    background: linear-gradient(135deg, #FFD700, #FFA500); 
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.rank-2 { 
    background: linear-gradient(135deg, #C0C0C0, #808080); 
    box-shadow: 0 0 15px rgba(192, 192, 192, 0.5);
}

.rank-3 { 
    background: linear-gradient(135deg, #CD7F32, #8B4513); 
    box-shadow: 0 0 15px rgba(205, 127, 50, 0.5);
}

.rank-other { 
    background: linear-gradient(135deg, var(--black-light), var(--card-bg)); 
    color: var(--gold);
    border: 1px solid var(--gold);
}

.leaderboard-info {
    flex: 1;
}

.leaderboard-name {
    font-weight: bold;
    color: var(--gold);
    margin-bottom: 0.25rem;
}

.leaderboard-stats {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.leaderboard-profit {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--success);
}

/* Compact Podium Styles for Overall Ranking */
.compact-podium {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.compact-podium-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0.75rem;
    border-radius: 8px;
    min-width: 80px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.2);
    transition: transform 0.2s ease;
}

.compact-podium-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.2);
}

.compact-rank {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--gold);
    margin-bottom: 0.25rem;
}

.compact-medal {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.compact-name {
    font-weight: bold;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.compact-wins {
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* Monthly List Styles */
.monthly-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 1rem 0;
}

.monthly-list-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.1);
    transition: all 0.2s ease;
}

.monthly-list-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 215, 0, 0.2);
    transform: translateX(3px);
}

.monthly-rank-badge {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    margin-right: 0.75rem;
    color: var(--black);
}

/* Rank badge colors for different places */
.monthly-rank-badge.rank-1 {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: var(--black);
}

.monthly-rank-badge.rank-2 {
    background: linear-gradient(135deg, #C0C0C0, #A0A0A0);
    color: var(--black);
}

.monthly-rank-badge.rank-3 {
    background: linear-gradient(135deg, #CD7F32, #B8860B);
    color: var(--black);
}

.monthly-rank-badge.rank-other {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.monthly-medal-icon {
    font-size: 1.2rem;
    margin-right: 0.75rem;
    min-width: 20px;
    text-align: center;
}

.monthly-trader-name {
    flex: 1;
    font-weight: bold;
    color: var(--text-primary);
    font-size: 0.95rem;
}

/* Overall Winners Card */
.overall-winners {
    border: 2px solid var(--gold);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 215, 0, 0.05));
}

.monthly-results {
    margin-top: 1.5rem;
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    z-index: 998;
}

.overlay.active {
    display: block;
}

/* Loading & Empty States */
.loading {
    display: none;
    text-align: center;
    padding: 2rem;
    color: var(--gold);
}

.loading.active {
    display: block;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-dim);
}

.empty-state h3 {
    color: var(--gold);
    margin-bottom: 1rem;
}

/* Fix für Burger Menu Klickbarkeit */
.burger {
    width: 40px;  /* Größer machen */
    height: 40px;
    cursor: pointer;
    position: relative;
    z-index: 1002;  /* Höher setzen */
    padding: 5px;  /* Klickbereich vergrößern */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.burger span {
    pointer-events: none;  /* Spans nicht klickbar machen */
}

/* Mobile Menu z-index erhöhen */
.mobile-menu {
    z-index: 1001;
}

/* Overlay z-index */
.overlay {
    z-index: 1000;
}