* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        :root {
            --primary: #667eea;
            --primary-dark: #5a67d8;
            --secondary: #48bb78;
            --danger: #f56565;
            --warning: #ed8936;
            --dark-bg: #1a202c;
            --dark-card: #2d3748;
            --dark-text: #e2e8f0;
            --light-bg: #f7fafc;
            --light-card: #ffffff;
            --light-text: #2d3748;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            transition: background 0.3s ease;
        }

        body.dark-mode {
            background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
        }

        .container {
            width: 100%;
            max-width: 1200px;
            padding: 20px;
        }

        .auth-container {
            max-width: 400px;
            margin: 0 auto;
        }

        .card {
            background: var(--light-card);
            border-radius: 20px;
            padding: 30px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
            animation: slideIn 0.3s ease;
        }

        body.dark-mode .card {
            background: var(--dark-card);
            color: var(--dark-text);
        }

        @keyframes slideIn {
            from {
                opacity: 0;
                transform: translateY(-20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        h1, h2 {
            text-align: center;
            margin-bottom: 20px;
            color: var(--primary);
        }

        body.dark-mode h1, body.dark-mode h2 {
            color: var(--dark-text);
        }

        .form-group {
            margin-bottom: 20px;
        }

        label {
            display: block;
            margin-bottom: 5px;
            font-weight: 600;
        }

        input {
            width: 100%;
            padding: 12px;
            border: 2px solid #e2e8f0;
            border-radius: 10px;
            font-size: 16px;
            transition: border-color 0.3s;
        }

        input:focus {
            outline: none;
            border-color: var(--primary);
        }

        body.dark-mode input {
            background: var(--dark-bg);
            border-color: #4a5568;
            color: var(--dark-text);
        }

        .btn {
            width: 100%;
            padding: 12px;
            background: var(--primary);
            color: white;
            border: none;
            border-radius: 10px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
        }

        .btn:hover {
            background: var(--primary-dark);
            transform: translateY(-2px);
        }

        .btn-secondary {
            background: transparent;
            color: var(--primary);
            border: 2px solid var(--primary);
        }

        .btn-secondary:hover {
            background: var(--primary);
            color: white;
        }

        .toggle-form {
            text-align: center;
            margin-top: 20px;
        }

        .toggle-form a {
            color: var(--primary);
            text-decoration: none;
            font-weight: 600;
        }

        .error {
            color: var(--danger);
            font-size: 14px;
            margin-top: 5px;
        }

        .success {
            color: var(--secondary);
            font-size: 14px;
            margin-top: 5px;
        }

        /* Game Styles */
        .game-container {
            display: none;
        }

        .game-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 30px;
            flex-wrap: wrap;
            gap: 10px;
        }

        .user-info {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .username {
            font-size: 18px;
            font-weight: 600;
            color: var(--primary);
        }

        body.dark-mode .username {
            color: var(--dark-text);
        }

        .btn-small {
            padding: 8px 16px;
            font-size: 14px;
            width: auto;
        }

        .game-stats {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            gap: 15px;
            margin-bottom: 30px;
        }

        .stat-card {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 20px;
            border-radius: 15px;
            text-align: center;
        }

        body.dark-mode .stat-card {
            background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
        }

        .stat-value {
            font-size: 32px;
            font-weight: bold;
        }

        .stat-label {
            font-size: 14px;
            opacity: 0.9;
            margin-top: 5px;
        }

        .game-area {
            margin-bottom: 30px;
        }

        .choices {
            display: flex;
            justify-content: center;
            gap: 30px;
            margin: 30px 0;
            flex-wrap: wrap;
        }

        .choice-btn {
            background: white;
            border: 3px solid var(--primary);
            border-radius: 20px;
            padding: 30px;
            font-size: 60px;
            cursor: pointer;
            transition: all 0.3s;
            position: relative;
        }

        body.dark-mode .choice-btn {
            background: var(--dark-card);
        }

        .choice-btn:hover {
            transform: translateY(-10px) scale(1.1);
            box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
        }

        .choice-btn.selected {
            background: var(--primary);
            color: white;
            animation: pulse 0.5s;
        }

        @keyframes pulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.1); }
        }

        .battle-area {
            display: none;
            margin: 30px 0;
            text-align: center;
        }

        .battle-choices {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 50px;
            margin: 30px 0;
            flex-wrap: wrap;
        }

        .battle-choice {
            text-align: center;
        }

        .battle-choice-icon {
            font-size: 80px;
            animation: slideInChoice 0.5s;
        }

        @keyframes slideInChoice {
            from {
                opacity: 0;
                transform: scale(0.5) rotate(-180deg);
            }
            to {
                opacity: 1;
                transform: scale(1) rotate(0);
            }
        }

        .battle-vs {
            font-size: 40px;
            font-weight: bold;
            color: var(--warning);
        }

        .result {
            font-size: 36px;
            font-weight: bold;
            margin: 20px 0;
            animation: bounceIn 0.5s;
        }

        @keyframes bounceIn {
            0% { transform: scale(0); }
            50% { transform: scale(1.2); }
            100% { transform: scale(1); }
        }

        .result.win { color: var(--secondary); }
        .result.lose { color: var(--danger); }
        .result.draw { color: var(--warning); }

        .history {
            max-height: 300px;
            overflow-y: auto;
            margin-top: 20px;
        }

        .history-item {
            background: rgba(102, 126, 234, 0.1);
            padding: 10px;
            margin-bottom: 10px;
            border-radius: 10px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        body.dark-mode .history-item {
            background: rgba(74, 85, 104, 0.3);
        }

        .leaderboard {
            margin-top: 30px;
        }

        .leaderboard-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 15px;
            background: rgba(102, 126, 234, 0.1);
            margin-bottom: 10px;
            border-radius: 10px;
        }

        body.dark-mode .leaderboard-item {
            background: rgba(74, 85, 104, 0.3);
        }

        .leaderboard-item:first-child {
            background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
            color: #333;
        }

        .dark-mode-toggle {
            position: fixed;
            top: 20px;
            right: 20px;
            background: var(--dark-bg);
            color: white;
            border: none;
            border-radius: 50%;
            width: 50px;
            height: 50px;
            font-size: 24px;
            cursor: pointer;
            transition: all 0.3s;
            z-index: 1000;
        }

        body.dark-mode .dark-mode-toggle {
            background: var(--light-bg);
            color: var(--dark-bg);
        }

        .dark-mode-toggle:hover {
            transform: rotate(180deg);
        }

        @media (max-width: 600px) {
            .choice-btn {
                font-size: 40px;
                padding: 20px;
            }
            
            .battle-choice-icon {
                font-size: 60px;
            }
            
            .result {
                font-size: 28px;
            }
        }