:root {
    --primary-color: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    
    --accent-red: #ef4444;
    --accent-blue: #3b82f6;
    --accent-gold: #f59e0b;
    --accent-green: #10b981;
    --accent-purple: #8b5cf6;
    --accent-pink: #ec4899;
    
    --bg-dark: #0f0f1a;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-glass: rgba(255, 255, 255, 0.08);
    
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.3);
    
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    --gradient-gold: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    --gradient-win: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    --gradient-lose: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
    
    --font-main: 'Noto Sans SC', sans-serif;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

#app {
    min-height: 100vh;
    position: relative;
}

#particles-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(236, 72, 153, 0.1) 0%, transparent 60%);
}

.glass-effect {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px var(--shadow-color);
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.header-left {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 28px;
    animation: bounce 2s infinite;
}

.logo-text {
    font-size: 24px;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    gap: 10px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition-normal);
    font-size: 14px;
}

.nav-item i {
    font-size: 18px;
    margin-bottom: 4px;
}

.nav-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.nav-item.active {
    color: var(--text-primary);
    background: var(--gradient-primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition-normal);
}

.user-info:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-avatar {
    position: relative;
    width: 40px;
    height: 40px;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.level-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: var(--gradient-primary);
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
}

.user-title {
    font-size: 11px;
    color: var(--accent-gold);
}

.user-coins {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--accent-gold);
    font-weight: 600;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-main);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-danger {
    background: var(--accent-red);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-glow {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

.btn-glow:hover {
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.7);
}

.btn-full {
    width: 100%;
}

.main-content {
    padding-top: 90px;
    padding-bottom: 30px;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.page {
    display: none;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

.hero-section {
    text-align: center;
    padding: 40px 20px;
}

.hero-dice {
    width: 120px;
    height: 120px;
    margin: 0 auto 30px;
    perspective: 600px;
    animation: float 3s ease-in-out infinite;
}

.dice-face {
    position: absolute;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    background: var(--bg-glass);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
}

.hero-title {
    margin-bottom: 15px;
}

.title-main {
    display: block;
    font-size: 48px;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 40px rgba(99, 102, 241, 0.5);
}

.title-sub {
    display: block;
    font-size: 18px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 10px;
}

.hero-desc {
    color: var(--text-muted);
    font-size: 16px;
}

.fortune-widget {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    border-radius: var(--radius-xl);
    margin-bottom: 40px;
    cursor: pointer;
    transition: var(--transition-normal);
}

.fortune-widget:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.3);
}

.fortune-icon {
    font-size: 32px;
    animation: pulse 2s infinite;
}

.fortune-content {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.fortune-label {
    font-size: 12px;
    color: var(--text-muted);
}

.fortune-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--accent-gold);
}

.fortune-score {
    font-size: 12px;
    color: var(--text-secondary);
}

.game-modes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.mode-card {
    position: relative;
    padding: 25px;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition-normal);
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 20px;
}

.mode-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.mode-card:hover .mode-glow {
    opacity: 1;
}

.mode-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    font-size: 28px;
    flex-shrink: 0;
}

.mode-info h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 5px;
}

.mode-info p {
    font-size: 13px;
    color: var(--text-secondary);
}

.mode-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
}

.mode-badge.easy {
    background: var(--accent-green);
}

.mode-badge.hard {
    background: var(--accent-red);
}

.mode-badge.pvp {
    background: var(--accent-blue);
}

.mode-badge.streak {
    background: var(--accent-gold);
}

.mode-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, transparent 50%);
    opacity: 0;
    transition: var(--transition-normal);
    pointer-events: none;
}

.streak-flames {
    position: absolute;
    bottom: 10px;
    right: 15px;
    display: flex;
    gap: 2px;
}

.flame {
    font-size: 16px;
    animation: flameFlicker 0.5s infinite alternate;
}

.flame:nth-child(2) {
    animation-delay: 0.1s;
}

.flame:nth-child(3) {
    animation-delay: 0.2s;
}

.quick-stats {
    padding: 25px;
    border-radius: var(--radius-lg);
}

.quick-stats h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 18px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.stat-item {
    text-align: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
}

.stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-item.win .stat-value {
    color: var(--accent-green);
}

.stat-item.lose .stat-value {
    color: var(--accent-red);
}

.stat-item.streak .stat-value {
    color: var(--accent-gold);
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.game-container {
    max-width: 900px;
    margin: 0 auto;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 15px;
}

.btn-back {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 20px;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.2);
}

.mobile-menu-btn {
    display: none;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 18px;
    transition: var(--transition-normal);
}

.mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.nav-menu.show {
    display: flex !important;
}

.game-mode-display {
    display: flex;
    flex-direction: column;
}

.mode-label {
    font-size: 12px;
    color: var(--text-muted);
}

.mode-name {
    font-size: 20px;
    font-weight: 700;
}

.streak-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(245, 158, 11, 0.2);
    border-radius: var(--radius-lg);
    color: var(--accent-gold);
    font-size: 16px;
}

.battle-arena {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: center;
    margin-bottom: 40px;
    padding: 30px;
    background: var(--bg-glass);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
}

.player-side, .opponent-side {
    text-align: center;
}

.player-avatar {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
}

.player-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-color);
}

.player-level {
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-primary);
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 3px 10px;
    border-radius: 10px;
    white-space: nowrap;
}

.player-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
}

.player-choice {
    width: 100px;
    height: 100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    border: 2px dashed var(--border-color);
    font-size: 50px;
}

.vs-center {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vs-text {
    font-size: 36px;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    z-index: 1;
}

.vs-electric {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, transparent 70%);
    animation: pulse 1.5s infinite;
}

.result-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.result-overlay.show {
    display: flex;
}

.result-content {
    text-align: center;
    padding: 40px;
}

.result-icon {
    font-size: 100px;
    margin-bottom: 20px;
    animation: bounceIn 0.5s ease;
}

.result-text {
    font-size: 36px;
    font-weight: 900;
    margin-bottom: 15px;
}

.result-overlay.win .result-text {
    color: var(--accent-green);
}

.result-overlay.lose .result-text {
    color: var(--accent-red);
}

.result-overlay.draw .result-text {
    color: var(--accent-gold);
}

.result-rewards {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 18px;
}

.choice-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.choice-btn {
    position: relative;
    width: 120px;
    height: 120px;
    border: none;
    border-radius: var(--radius-lg);
    background: var(--bg-glass);
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition-normal);
    overflow: hidden;
}

.choice-btn:hover {
    transform: scale(1.1);
    border-color: var(--primary-color);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.5);
}

.choice-btn:active {
    transform: scale(0.95);
}

.choice-btn.rock:hover {
    border-color: var(--accent-red);
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.5);
}

.choice-btn.scissors:hover {
    border-color: var(--accent-blue);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.5);
}

.choice-btn.paper:hover {
    border-color: var(--accent-green);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.5);
}

.btn-icon {
    font-size: 50px;
    margin-bottom: 5px;
}

.btn-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.btn-ripple {
    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.3s, height 0.3s;
}

.choice-btn:active .btn-ripple {
    width: 200px;
    height: 200px;
}

.game-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.matching-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
}

.matching-content {
    text-align: center;
}

.radar-animation {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 30px;
}

.radar-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    opacity: 0;
    animation: radarPulse 2s infinite;
}

.radar-circle:nth-child(1) {
    width: 50px;
    height: 50px;
    animation-delay: 0s;
}

.radar-circle:nth-child(2) {
    width: 100px;
    height: 100px;
    animation-delay: 0.5s;
}

.radar-circle:nth-child(3) {
    width: 150px;
    height: 150px;
    animation-delay: 1s;
}

.radar-sweep {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
    transform-origin: left center;
    animation: radarSweep 2s infinite linear;
}

.matching-text {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.records-container {
    max-width: 900px;
    margin: 0 auto;
}

.records-header {
    padding: 25px;
    border-radius: var(--radius-lg);
    margin-bottom: 25px;
    text-align: center;
}

.records-header h2 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 24px;
}

.stats-dashboard {
    padding: 30px;
    border-radius: var(--radius-lg);
    margin-bottom: 25px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 30px;
    align-items: center;
}

.dashboard-ring {
    position: relative;
    width: 150px;
    height: 150px;
}

.ring-chart {
    transform: rotate(-90deg);
}

.ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 8;
}

.ring-win {
    fill: none;
    stroke: var(--accent-green);
    stroke-width: 8;
    stroke-dasharray: 251.2;
    stroke-dashoffset: 251.2;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease;
}

.ring-lose {
    fill: none;
    stroke: var(--accent-red);
    stroke-width: 8;
    stroke-dasharray: 251.2;
    stroke-dashoffset: 251.2;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease;
}

.ring-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.win-rate {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--accent-green);
}

.rate-label {
    font-size: 12px;
    color: var(--text-muted);
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.dash-stat {
    text-align: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
}

.dash-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
}

.dash-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.choice-stats {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    gap: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.choice-stat {
    text-align: center;
}

.choice-icon {
    display: block;
    font-size: 36px;
    margin-bottom: 5px;
}

.choice-count {
    display: block;
    font-size: 20px;
    font-weight: 700;
}

.choice-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.records-timeline {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.timeline-empty {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-glass);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.timeline-empty i {
    font-size: 48px;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.timeline-empty p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.record-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: var(--bg-glass);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: var(--transition-normal);
}

.record-card:hover {
    transform: translateX(5px);
    border-color: var(--primary-color);
}

.record-card.win {
    border-left: 4px solid var(--accent-green);
}

.record-card.lose {
    border-left: 4px solid var(--accent-red);
}

.record-card.draw {
    border-left: 4px solid var(--accent-gold);
}

.record-result {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-size: 24px;
    font-weight: 700;
}

.record-card.win .record-result {
    background: rgba(16, 185, 129, 0.2);
    color: var(--accent-green);
}

.record-card.lose .record-result {
    background: rgba(239, 68, 68, 0.2);
    color: var(--accent-red);
}

.record-card.draw .record-result {
    background: rgba(245, 158, 11, 0.2);
    color: var(--accent-gold);
}

.record-info {
    flex: 1;
}

.record-mode {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
}

.record-opponent {
    font-size: 12px;
    color: var(--text-secondary);
}

.record-choices {
    display: flex;
    gap: 10px;
    font-size: 24px;
}

.record-time {
    font-size: 12px;
    color: var(--text-muted);
}

.leaderboard-container {
    max-width: 900px;
    margin: 0 auto;
}

.leaderboard-header {
    padding: 25px;
    border-radius: var(--radius-lg);
    margin-bottom: 25px;
    text-align: center;
}

.leaderboard-header h2 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 24px;
}

.leaderboard-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.lb-tab {
    padding: 10px 25px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    font-family: var(--font-main);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
}

.lb-tab.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
}

.lb-tab:hover {
    background: rgba(255, 255, 255, 0.1);
}

.podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 25px;
    padding: 30px;
    border-radius: var(--radius-lg);
}

.podium-item {
    text-align: center;
    position: relative;
}

.podium-item.first {
    order: 2;
}

.podium-item.second {
    order: 1;
}

.podium-item.third {
    order: 3;
}

.podium-crown {
    font-size: 30px;
    margin-bottom: 5px;
    animation: float 2s ease-in-out infinite;
}

.podium-avatar {
    position: relative;
    width: 70px;
    height: 70px;
    margin: 0 auto 10px;
}

.podium-item.first .podium-avatar {
    width: 90px;
    height: 90px;
}

.podium-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-color);
}

.podium-item.first .podium-avatar img {
    border-color: var(--accent-gold);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
}

.podium-medal {
    position: absolute;
    bottom: -5px;
    right: -5px;
    font-size: 20px;
}

.podium-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.podium-score {
    font-size: 14px;
    color: var(--accent-gold);
    margin-bottom: 10px;
}

.podium-stand {
    width: 80px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 900;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.podium-item.first .podium-stand {
    height: 80px;
    background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%);
    color: #78350f;
}

.podium-item.second .podium-stand {
    height: 60px;
    background: linear-gradient(180deg, #e5e7eb 0%, #9ca3af 100%);
    color: #374151;
}

.podium-item.third .podium-stand {
    height: 45px;
    background: linear-gradient(180deg, #fcd34d 0%, #d97706 100%);
    color: #78350f;
}

.leaderboard-list {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-normal);
}

.leaderboard-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.leaderboard-item:last-child {
    border-bottom: none;
}

.lb-rank {
    width: 30px;
    text-align: center;
    font-weight: 700;
    color: var(--text-muted);
}

.lb-rank.top-3 {
    color: var(--accent-gold);
}

.lb-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.lb-info {
    flex: 1;
}

.lb-name {
    font-weight: 600;
    font-size: 14px;
}

.lb-title {
    font-size: 11px;
    color: var(--accent-gold);
}

.lb-score {
    font-weight: 700;
    color: var(--accent-gold);
}

.lb-choice {
    font-size: 20px;
}

.profile-container {
    max-width: 800px;
    margin: 0 auto;
}

.profile-header {
    position: relative;
    padding: 30px;
    border-radius: var(--radius-lg);
    margin-bottom: 25px;
    overflow: hidden;
}

.profile-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: var(--gradient-primary);
    opacity: 0.3;
}

.profile-main {
    position: relative;
    display: flex;
    align-items: center;
    gap: 25px;
}

.profile-avatar-large {
    position: relative;
    width: 100px;
    height: 100px;
}

.profile-avatar-large img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
}

.avatar-frame {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 2px solid var(--accent-gold);
    border-radius: 50%;
    animation: spin 10s linear infinite;
}

.profile-level {
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-primary);
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 4px 12px;
    border-radius: 12px;
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
}

.profile-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 15px;
    background: rgba(245, 158, 11, 0.2);
    border-radius: var(--radius-lg);
    color: var(--accent-gold);
    font-size: 14px;
    margin-bottom: 15px;
}

.profile-exp {
    display: flex;
    align-items: center;
    gap: 15px;
}

.exp-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.exp-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.exp-text {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.profile-stats {
    padding: 25px;
    border-radius: var(--radius-lg);
    margin-bottom: 25px;
}

.profile-stats h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 18px;
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.pstat-item {
    text-align: center;
    padding: 20px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
}

.pstat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pstat-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.titles-section {
    padding: 25px;
    border-radius: var(--radius-lg);
    margin-bottom: 25px;
}

.titles-section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 18px;
}

.titles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.title-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition-normal);
}

.title-badge:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.title-badge.unlocked {
    border-color: var(--accent-gold);
    background: rgba(245, 158, 11, 0.1);
}

.title-badge.equipped {
    border-color: var(--accent-green);
    background: rgba(16, 185, 129, 0.1);
}

.title-badge.locked {
    opacity: 0.5;
    filter: grayscale(1);
}

.badge-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.badge-name {
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 5px;
}

.badge-desc {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
}

.profile-actions {
    padding: 25px;
    border-radius: var(--radius-lg);
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    z-index: 3000;
    padding: 20px;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    position: relative;
    width: 100%;
    max-width: 400px;
    padding: 30px;
    border-radius: var(--radius-lg);
    animation: slideUp 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.modal-header {
    text-align: center;
    margin-bottom: 25px;
}

.modal-header h2 {
    font-size: 24px;
}

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.auth-tab {
    flex: 1;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: var(--font-main);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
}

.auth-tab.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.form-group input {
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 14px;
    transition: var(--transition-normal);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.report-modal {
    max-width: 500px;
}

.report-content {
    text-align: center;
    padding: 20px;
}

.toast-container {
    position: fixed;
    top: 90px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 4000;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    animation: slideIn 0.3s ease;
    min-width: 280px;
}

.toast.success {
    border-color: var(--accent-green);
}

.toast.error {
    border-color: var(--accent-red);
}

.toast.info {
    border-color: var(--accent-blue);
}

.toast-icon {
    font-size: 20px;
}

.toast.success .toast-icon {
    color: var(--accent-green);
}

.toast.error .toast-icon {
    color: var(--accent-red);
}

.toast.info .toast-icon {
    color: var(--accent-blue);
}

.toast-message {
    flex: 1;
    font-size: 14px;
}

@media (max-width: 768px) {
    .header {
        padding: 0 15px;
        height: 60px;
    }
    
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .nav-menu {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: rgba(15, 15, 26, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 20px;
        gap: 10px;
        z-index: 999;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-menu.show {
        display: flex;
    }
    
    .nav-item {
        flex-direction: row;
        justify-content: flex-start;
        padding: 15px 20px;
        gap: 15px;
    }
    
    .nav-item i {
        margin-bottom: 0;
        font-size: 20px;
    }
    
    .logo-text {
        font-size: 20px;
    }
    
    .user-details {
        display: none;
    }
    
    .main-content {
        padding-top: 80px;
    }
    
    .title-main {
        font-size: 32px;
    }
    
    .title-sub {
        font-size: 14px;
    }
    
    .game-modes {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .battle-arena {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .vs-center {
        order: 2;
        width: 80px;
        height: 80px;
    }
    
    .player-side {
        order: 1;
    }
    
    .opponent-side {
        order: 3;
    }
    
    .choice-buttons {
        flex-wrap: wrap;
    }
    
    .choice-btn {
        width: 100px;
        height: 100px;
    }
    
    .game-header {
        flex-wrap: wrap;
    }
    
    .btn-back {
        order: -1;
        width: 100%;
        margin-bottom: 10px;
    }
    
    .stats-dashboard {
        grid-template-columns: 1fr;
    }
    
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .podium {
        flex-direction: column;
        align-items: center;
    }
    
    .podium-item.first {
        order: 1;
    }
    
    .podium-item.second {
        order: 2;
    }
    
    .podium-item.third {
        order: 3;
    }
    
    .profile-main {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .profile-actions {
        flex-direction: column;
    }
    
    .profile-actions .btn {
        width: 100%;
    }
}
