 :root {
            --primary: #3a0ca3;
            --secondary: #4361ee;
            --accent: #7209b7;
            --dark: #10002b;
            --light: #f8f9fa;
            --success: #4cc9f0;
            --warning: #f72585;
            --danger: #e63946;
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Raleway', sans-serif;
            background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
            color: var(--light);
            min-height: 100vh;
            overflow-x: hidden;
            position: relative;
        }
        
        .starry-bg {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: -2;
            overflow: hidden;
        }
        
        .star {
            position: absolute;
            background-color: white;
            border-radius: 50%;
            opacity: var(--opacity);
            animation: twinkle var(--duration) infinite ease-in-out;
        }
        
        @keyframes twinkle {
            0%, 100% { opacity: calc(var(--opacity) * 0.5); }
            50% { opacity: var(--opacity); }
        }
        
        .floating-crystal {
            position: fixed;
            width: 30px;
            height: 50px;
            background: linear-gradient(135deg, rgba(114, 9, 183, 0.7), rgba(58, 12, 163, 0.5));
            border-radius: 50%;
            filter: blur(5px);
            z-index: -1;
            animation: float 8s infinite ease-in-out;
            box-shadow: 0 0 15px rgba(114, 9, 183, 0.7);
        }
        
        @keyframes float {
            0%, 100% { transform: translateY(0) rotate(0deg); }
            50% { transform: translateY(-20px) rotate(5deg); }
        }
        
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
            position: relative;
            z-index: 1;
        }
        
        .magic-emblem {
            position: absolute;
            top: 20px;
            right: 20px;
            width: 100px;
            height: 100px;
            z-index: 2;
        }
        
        .emblem-circle {
            position: absolute;
            width: 100%;
            height: 100%;
            border: 3px solid var(--accent);
            border-radius: 50%;
            animation: rotate 20s linear infinite;
        }
        
        .emblem-inner {
            position: absolute;
            top: 15%;
            left: 15%;
            width: 70%;
            height: 70%;
            border: 2px solid var(--success);
            border-radius: 50%;
            display: flex;
            justify-content: center;
            align-items: center;
        }
        
        .emblem-icon {
            font-size: 2.5rem;
            color: var(--success);
            animation: pulse 3s infinite;
        }
        
        @keyframes rotate {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        
        @keyframes pulse {
            0%, 100% { transform: scale(1); opacity: 0.8; }
            50% { transform: scale(1.2); opacity: 1; }
        }
        
        .header {
            text-align: center;
            padding: 40px 0 30px;
            position: relative;
        }
        
        .header h1 {
            font-family: 'Cinzel', serif;
            font-size: 3rem;
            margin-bottom: 10px;
            text-shadow: 0 0 10px var(--accent);
            background: linear-gradient(to right, #f72585, #4361ee, #4cc9f0);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            letter-spacing: 2px;
        }
        
        .header p {
            font-size: 1.2rem;
            opacity: 0.8;
            max-width: 600px;
            margin: 0 auto;
        }
        
        .main-content {
            display: flex;
            flex-wrap: wrap;
            gap: 30px;
            margin: 20px 0;
        }
        
        .world-info, .fortune-section {
            flex: 1;
            min-width: 300px;
            background: rgba(25, 25, 60, 0.7);
            backdrop-filter: blur(10px);
            border-radius: 15px;
            padding: 25px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
            border: 1px solid rgba(114, 9, 183, 0.3);
        }
        
        h2 {
            font-family: 'MedievalSharp', cursive;
            color: var(--success);
            margin-bottom: 20px;
            padding-bottom: 10px;
            border-bottom: 2px solid var(--accent);
            text-align: center;
            font-size: 1.8rem;
        }
        
        .faction-card {
            background: rgba(58, 12, 163, 0.2);
            border-radius: 10px;
            padding: 15px;
            margin-bottom: 15px;
            border-left: 3px solid var(--accent);
            transition: transform 0.3s, background 0.3s;
        }
        
        .faction-card:hover {
            transform: translateY(-3px);
            background: rgba(114, 9, 183, 0.3);
            cursor: pointer;
        }
        
        .faction-card h3 {
            display: flex;
            align-items: center;
            font-size: 1.3rem;
            margin-bottom: 8px;
            color: var(--success);
        }
        
        .icon {
            margin-right: 10px;
            color: var(--warning);
        }
        
        .faction-card p {
            font-size: 0.95rem;
            line-height: 1.5;
            opacity: 0.9;
        }
        
        .input-group {
            margin-bottom: 30px;
        }
        
        .input-group label {
            display: block;
            margin-bottom: 10px;
            font-size: 1.1rem;
        }
        
        .qq-input {
            display: flex;
            gap: 10px;
        }
        
        .qq-input input {
            flex: 1;
            padding: 12px 15px;
            border-radius: 8px;
            border: 2px solid var(--accent);
            background: rgba(16, 0, 43, 0.7);
            color: white;
            font-size: 1.1rem;
            transition: all 0.3s;
        }
        
        .qq-input input:focus {
            outline: none;
            border-color: var(--success);
            box-shadow: 0 0 15px rgba(76, 201, 240, 0.5);
        }
        
        #get-fortune {
            background: linear-gradient(135deg, var(--accent), var(--primary));
            color: white;
            border: none;
            padding: 0 25px;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 600;
            font-size: 1rem;
            transition: transform 0.2s, box-shadow 0.2s;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        #get-fortune:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(114, 9, 183, 0.7);
        }
        
        #get-fortune:active {
            transform: translateY(1px);
        }
        
        .crystal-ball-container {
            width: 200px;
            height: 200px;
            margin: 0 auto 40px;
            border-radius: 50%;
            background: radial-gradient(circle at 30% 30%, #6a11cb, #2575fc);
            box-shadow: 
                inset 0 0 50px rgba(0, 0, 0, 0.7),
                0 0 60px rgba(114, 9, 183, 0.8);
            position: relative;
            overflow: hidden;
            display: flex;
            justify-content: center;
            align-items: center;
            animation: float 6s ease-in-out infinite;
        }
        
        .crystal-ball-inner {
            width: 180px;
            height: 180px;
            border-radius: 50%;
            background: radial-gradient(circle at 30% 30%, #8a2be2, #4169e1);
            position: relative;
            overflow: hidden;
        }
        
        .crystal-ball-shine {
            position: absolute;
            width: 60px;
            height: 60px;
            background: rgba(255, 255, 255, 0.3);
            border-radius: 50%;
            top: 30px;
            left: 30px;
            filter: blur(10px);
        }
        
        .loading {
            text-align: center;
            padding: 20px;
            display: none;
        }
        
        .spinner {
            width: 50px;
            height: 50px;
            border: 5px solid rgba(76, 201, 240, 0.3);
            border-top: 5px solid var(--success);
            border-radius: 50%;
            margin: 0 auto 15px;
            animation: spin 1s linear infinite;
        }
        
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        
        .error {
            background: rgba(230, 57, 70, 0.2);
            border: 1px solid var(--danger);
            border-radius: 8px;
            padding: 15px;
            margin-bottom: 20px;
            display: none;
        }
        
        .error p {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .result-container {
            display: none;
            animation: fadeIn 0.8s ease;
        }
        
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        .result-content {
            background: rgba(16, 0, 43, 0.8);
            border-radius: 15px;
            padding: 25px;
            border: 1px solid var(--accent);
        }
        
        .fortune-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 1px solid rgba(114, 9, 183, 0.5);
        }
        
        .fortune-header h3 {
            font-size: 1.6rem;
            color: var(--success);
        }
        
        .date {
            font-size: 0.9rem;
            opacity: 0.8;
        }
        
        .fortune-level {
            text-align: center;
            margin-bottom: 25px;
        }
        
        .fortune-level h4 {
            font-size: 1.2rem;
            margin-bottom: 10px;
            color: var(--warning);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }
        
        .level {
            font-size: 2.5rem;
            font-weight: bold;
            margin: 10px 0;
            text-shadow: 0 0 15px currentColor;
        }
        
        .level-description {
            font-size: 1.1rem;
            opacity: 0.9;
        }
        
        .character-card {
            display: flex;
            align-items: center;
            gap: 20px;
            background: rgba(58, 12, 163, 0.3);
            padding: 15px;
            border-radius: 10px;
            margin-bottom: 25px;
        }
        
        .character-avatar {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--accent), var(--primary));
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 2.5rem;
        }
        
        .character-info {
            flex: 1;
        }
        
        .character-info h4 {
            font-size: 1.5rem;
            margin-bottom: 5px;
        }
        
        .character-info p {
            font-size: 0.95rem;
            opacity: 0.9;
            margin-bottom: 3px;
        }
        
        .location-info, .faction-info, .advice {
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 1px solid rgba(114, 9, 183, 0.3);
        }
        
        .location-info h4, .faction-info h4, .advice h4 {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 1.2rem;
            margin-bottom: 10px;
            color: var(--warning);
        }
        
        .resonance {
            margin-bottom: 25px;
        }
        
        .resonance h4 {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 1.2rem;
            margin-bottom: 10px;
            color: var(--warning);
        }
        
        .resonance-bar {
            height: 20px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 10px;
            overflow: hidden;
            margin-bottom: 8px;
        }
        
        .resonance-level {
            height: 100%;
            border-radius: 10px;
            background: linear-gradient(to right, #9B59B6, #E74C3C);
            width: 75%;
            transition: width 1s ease;
        }
        
        .resonance-value {
            text-align: right;
            font-size: 0.9rem;
            opacity: 0.8;
        }
        
        .back-button {
            text-align: center;
            margin-top: 20px;
        }
        
        .back-button button {
            background: linear-gradient(135deg, var(--accent), var(--primary));
            color: white;
            border: none;
            padding: 12px 30px;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 600;
            font-size: 1rem;
            transition: all 0.3s;
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }
        
        .back-button button:hover {
            transform: translateY(-3px);
            box-shadow: 0 5px 20px rgba(114, 9, 183, 0.7);
        }
        
        .footer {
            text-align: center;
            padding: 30px 0 20px;
            font-size: 0.9rem;
            opacity: 0.7;
            margin-top: 40px;
        }
        
        .api-info {
            font-family: monospace;
            font-size: 0.8rem;
            margin-top: 10px;
            opacity: 0.6;
            word-break: break-all;
        }
        
        @media (max-width: 768px) {
            .header h1 {
                font-size: 2.2rem;
            }
            
            .magic-emblem {
                width: 70px;
                height: 70px;
                top: 10px;
                right: 10px;
            }
            
            .emblem-icon {
                font-size: 1.8rem;
            }
            
            .qq-input {
                flex-direction: column;
            }
            
            .crystal-ball-container {
                width: 150px;
                height: 150px;
            }
            
            .crystal-ball-inner {
                width: 130px;
                height: 130px;
            }
        }