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

        body {
            font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            overflow-x: hidden;
        }

        .game-container {
            flex: 1;
            display: flex;
            flex-direction: column;
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
            gap: 20px;
        }

        .header {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 20px;
            padding: 30px;
            text-align: center;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
        }

        .header h1 {
            color: white;
            font-size: 2.5rem;
            font-weight: 700;
            margin-bottom: 10px;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
        }

        .header p {
            color: rgba(255, 255, 255, 0.9);
            font-size: 1.1rem;
            line-height: 1.6;
        }

        .main-content {
            display: grid;
            grid-template-columns: 1fr 400px;
            gap: 20px;
            align-items: start;
        }

        .ball-container {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 20px;
            padding: 40px;
            display: flex;
            flex-direction: column;
            align-items: center;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
            min-height: 600px;
            justify-content: center;
        }

        .magic-8-ball {
            width: 300px;
            height: 300px;
            border-radius: 50%;
            background: radial-gradient(circle at 30% 30%, #2c3e50, #000);
            position: relative;
            cursor: pointer;
            transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: 
                0 20px 40px rgba(0, 0, 0, 0.3),
                inset 0 10px 20px rgba(255, 255, 255, 0.1),
                inset 0 -10px 20px rgba(0, 0, 0, 0.3);
            margin-bottom: 30px;
        }

        .magic-8-ball:hover {
            transform: scale(1.05) rotateY(5deg);
            box-shadow: 
                0 25px 50px rgba(0, 0, 0, 0.4),
                inset 0 10px 20px rgba(255, 255, 255, 0.15),
                inset 0 -10px 20px rgba(0, 0, 0, 0.3);
        }

        .magic-8-ball.shaking {
            animation: shake 0.8s ease-in-out;
        }

        @keyframes shake {
            0%, 100% { transform: rotate(0deg) translateX(0); }
            10% { transform: rotate(-3deg) translateX(-5px); }
            20% { transform: rotate(3deg) translateX(5px); }
            30% { transform: rotate(-3deg) translateX(-5px); }
            40% { transform: rotate(3deg) translateX(5px); }
            50% { transform: rotate(-2deg) translateX(-3px); }
            60% { transform: rotate(2deg) translateX(3px); }
            70% { transform: rotate(-1deg) translateX(-2px); }
            80% { transform: rotate(1deg) translateX(2px); }
        }

        .ball-highlight {
            position: absolute;
            top: 15%;
            left: 20%;
            width: 60px;
            height: 60px;
            background: radial-gradient(circle, rgba(255, 255, 255, 0.4), transparent);
            border-radius: 50%;
            filter: blur(3px);
        }

        .answer-window {
            position: absolute;
            bottom: 20%;
            left: 50%;
            transform: translateX(-50%);
            width: 120px;
            height: 120px;
            background: linear-gradient(135deg, #1a1a2e, #16213e);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            border: 3px solid #333;
            box-shadow: 
                inset 0 5px 10px rgba(0, 0, 0, 0.5),
                0 5px 15px rgba(0, 0, 0, 0.3);
            overflow: hidden;
        }

        .answer-text {
            color: #00ff88;
            font-size: 0.7rem;
            font-weight: 600;
            text-align: center;
            padding: 10px;
            line-height: 1.2;
            text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
            opacity: 0;
            transition: all 0.5s ease;
            transform: translateY(20px);
        }

        .answer-text.visible {
            opacity: 1;
            transform: translateY(0);
        }

        .question-panel {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 20px;
            padding: 30px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
        }

        .question-input {
            width: 100%;
            background: rgba(255, 255, 255, 0.1);
            border: 2px solid rgba(255, 255, 255, 0.2);
            border-radius: 15px;
            padding: 20px;
            color: white;
            font-size: 1rem;
            min-height: 120px;
            resize: vertical;
            margin-bottom: 20px;
            transition: all 0.3s ease;
        }

        .question-input:focus {
            outline: none;
            border-color: rgba(255, 255, 255, 0.5);
            background: rgba(255, 255, 255, 0.15);
            box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
        }

        .question-input::placeholder {
            color: rgba(255, 255, 255, 0.6);
        }

        .btn {
            background: linear-gradient(135deg, #ff6b6b, #ee5a24);
            color: white;
            border: none;
            padding: 15px 30px;
            border-radius: 12px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(238, 90, 36, 0.3);
            width: 100%;
            margin-bottom: 15px;
        }

        .btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(238, 90, 36, 0.4);
        }

        .btn:active {
            transform: translateY(0);
        }

        .btn.secondary {
            background: linear-gradient(135deg, #4ecdc4, #44a08d);
            box-shadow: 0 4px 15px rgba(78, 205, 196, 0.3);
        }

        .btn.secondary:hover {
            box-shadow: 0 6px 20px rgba(78, 205, 196, 0.4);
        }

        .btn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none;
        }

        .history-section {
            margin-top: 30px;
        }

        .history-section h3 {
            color: white;
            font-size: 1.2rem;
            margin-bottom: 15px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .history-list {
            max-height: 300px;
            overflow-y: auto;
            border-radius: 10px;
            background: rgba(0, 0, 0, 0.1);
            padding: 10px;
        }

        .history-item {
            background: rgba(255, 255, 255, 0.05);
            border-radius: 8px;
            padding: 15px;
            margin-bottom: 10px;
            border-left: 3px solid #ff6b6b;
            transition: all 0.3s ease;
        }

        .history-item:hover {
            background: rgba(255, 255, 255, 0.1);
            transform: translateX(5px);
        }

        .history-question {
            color: rgba(255, 255, 255, 0.9);
            font-weight: 600;
            margin-bottom: 5px;
            font-size: 0.9rem;
        }

        .history-answer {
            color: #00ff88;
            font-size: 0.85rem;
            font-style: italic;
        }

        .history-time {
            color: rgba(255, 255, 255, 0.6);
            font-size: 0.75rem;
            margin-top: 5px;
        }

        .stats-panel {
            background: rgba(255, 255, 255, 0.05);
            border-radius: 15px;
            padding: 20px;
            margin-top: 20px;
        }

        .stats-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 15px;
        }

        .stat-item {
            text-align: center;
            padding: 15px;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 10px;
        }

        .stat-number {
            color: #ff6b6b;
            font-size: 1.8rem;
            font-weight: 700;
            display: block;
        }

        .stat-label {
            color: rgba(255, 255, 255, 0.8);
            font-size: 0.85rem;
            margin-top: 5px;
        }

        .settings-panel {
            background: rgba(255, 255, 255, 0.05);
            border-radius: 15px;
            padding: 20px;
            margin-top: 20px;
        }

        .setting-group {
            margin-bottom: 15px;
        }

        .setting-group label {
            color: white;
            font-weight: 600;
            font-size: 0.9rem;
            display: block;
            margin-bottom: 8px;
        }

        .setting-group select {
            width: 100%;
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 8px;
            padding: 10px;
            color: white;
            font-size: 0.9rem;
        }

        .setting-group select option {
            background: #2c3e50;
            color: white;
        }

        .mystical-effects {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            overflow: hidden;
            border-radius: 50%;
        }

        .particle {
            position: absolute;
            width: 4px;
            height: 4px;
            background: radial-gradient(circle, #00ff88, transparent);
            border-radius: 50%;
            opacity: 0;
            animation: float 3s infinite ease-in-out;
        }

        @keyframes float {
            0% {
                opacity: 0;
                transform: translateY(0) scale(0);
            }
            50% {
                opacity: 1;
                transform: translateY(-50px) scale(1);
            }
            100% {
                opacity: 0;
                transform: translateY(-100px) scale(0);
            }
        }

        .instructions {
            background: rgba(255, 255, 255, 0.05);
            border-radius: 15px;
            padding: 20px;
            margin-bottom: 20px;
        }

        .instructions h3 {
            color: white;
            font-size: 1.1rem;
            margin-bottom: 15px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .instructions ol {
            color: rgba(255, 255, 255, 0.8);
            padding-left: 20px;
            line-height: 1.6;
        }

        .instructions li {
            margin-bottom: 8px;
            font-size: 0.9rem;
        }

        .prediction-mood {
            text-align: center;
            margin: 20px 0;
            padding: 15px;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 12px;
        }

        .mood-emoji {
            font-size: 2rem;
            margin-bottom: 10px;
            display: block;
        }

        .mood-text {
            color: rgba(255, 255, 255, 0.8);
            font-size: 0.9rem;
            font-style: italic;
        }

        @media (max-width: 768px) {
            .main-content {
                grid-template-columns: 1fr;
                gap: 15px;
            }

            .game-container {
                padding: 15px;
            }

            .header h1 {
                font-size: 2rem;
            }

            .magic-8-ball {
                width: 250px;
                height: 250px;
            }

            .answer-window {
                width: 100px;
                height: 100px;
            }

            .answer-text {
                font-size: 0.6rem;
                padding: 8px;
            }

            .ball-container {
                padding: 20px;
                min-height: auto;
            }
        }

        .fortune-categories {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
            gap: 10px;
            margin: 15px 0;
        }

        .category-btn {
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.2);
            color: white;
            padding: 10px;
            border-radius: 8px;
            font-size: 0.8rem;
            cursor: pointer;
            transition: all 0.3s ease;
            text-align: center;
        }

        .category-btn:hover {
            background: rgba(255, 255, 255, 0.2);
            transform: translateY(-2px);
        }

        .category-btn.active {
            background: #ff6b6b;
            border-color: #ff6b6b;
        }

        .loading-spinner {
            display: none;
            width: 30px;
            height: 30px;
            border: 3px solid rgba(255, 255, 255, 0.3);
            border-top: 3px solid #00ff88;
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin: 0 auto;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        .crystal-ball-glow {
            position: absolute;
            top: -20px;
            left: -20px;
            right: -20px;
            bottom: -20px;
            border-radius: 50%;
            background: radial-gradient(circle, rgba(0, 255, 136, 0.1), transparent);
            opacity: 0;
            transition: opacity 0.5s ease;
        }

        .magic-8-ball.glowing .crystal-ball-glow {
            opacity: 1;
            animation: pulse-glow 2s infinite ease-in-out;
        }

        @keyframes pulse-glow {
            0%, 100% { transform: scale(1); opacity: 0.3; }
            50% { transform: scale(1.1); opacity: 0.6; }
        }