/* Tailwind CSS 基础样式 + 自定义样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.text-center { text-align: center; }

.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }

.m-4 { margin: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-md { max-width: 28rem; }
.max-w-2xl { max-width: 42rem; }

.text-white { color: #fff; }
.text-black { color: #000; }
.text-gray-200 { color: #e5e7eb; }
.text-gray-400 { color: #9ca3af; }
.text-gray-600 { color: #4b5563; }
.text-blue-300 { color: #93c5fd; }
.text-blue-400 { color: #60a5fa; }
.text-blue-500 { color: #3b82f6; }
.text-blue-600 { color: #2563eb; }
.text-cyan-300 { color: #67e8f9; }
.text-green-300 { color: #86efac; }
.text-yellow-300 { color: #fde047; }
.text-orange-300 { color: #fdba74; }
.text-purple-300 { color: #c4b5fd; }
.text-purple-400 { color: #a78bfa; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-sm { font-size: 0.875rem; }

.bg-white { background-color: #fff; }
.bg-black { background-color: #000; }
.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-gray-600 { background-color: #4b5563; }
.bg-gray-700 { background-color: #374151; }
.bg-gray-800 { background-color: #1f2937; }
.bg-blue-500 { background-color: #3b82f6; }
.bg-blue-600 { background-color: #2563eb; }
.bg-blue-700 { background-color: #1d4ed8; }
.bg-green-500 { background-color: #10b981; }
.bg-green-600 { background-color: #059669; }
.bg-green-700 { background-color: #047857; }
.bg-yellow-600 { background-color: #d97706; }
.bg-yellow-700 { background-color: #b45309; }
.bg-orange-500 { background-color: #f97316; }
.bg-purple-600 { background-color: #9333ea; }
.bg-purple-700 { background-color: #7c3aed; }

.border { border: 1px solid #e5e7eb; }
.border-2 { border: 2px solid #e5e7eb; }
.border-gray-600 { border-color: #4b5563; }
.border-blue-500 { border-color: #3b82f6; }
.border-l-4 { border-left-width: 4px; }
.border-blue-400 { border-left-color: #60a5fa; }
.border-white { border-color: #fff; }
.border-purple-400 { border-color: #c084fc; }
.border-yellow-400 { border-color: #facc15; }

.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }

.shadow { box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }

.hidden { display: none; }
.block { display: block; }
.w-full { width: 100%; }
.min-h-screen { min-height: 100vh; }
.max-h-96 { max-height: 24rem; }
.max-h-\[80vh\] { max-height: 80vh; }

.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-x-4 > * + * { margin-left: 1rem; }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

.transition-colors { transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, color 0.15s ease-in-out; }
.transition-all { transition: all 0.15s ease-in-out; }
.transition-transform { transition: transform 0.15s ease-in-out; }
.duration-300 { transition-duration: 300ms; }

.transform { transform: translateZ(0); }
.hover\:scale-105:hover { transform: scale(1.05); }
.hover\:from-blue-700:hover { background-color: #1d4ed8; }
.hover\:to-purple-700:hover { background-color: #7c3aed; }

/* 渐变背景 */
.bg-gradient-to-br { background-image: linear-gradient(to bottom right, var(--tw-gradient-stops)); }
.bg-gradient-to-r { background-image: linear-gradient(to right, var(--tw-gradient-stops)); }
.from-purple-600 { --tw-gradient-from: #9333ea; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(147, 51, 234, 0)); }
.to-blue-600 { --tw-gradient-to: #2563eb; }
.from-yellow-600 { --tw-gradient-from: #d97706; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(217, 119, 6, 0)); }
.via-orange-500 { --tw-gradient-stops: var(--tw-gradient-from), #f97316, var(--tw-gradient-to, rgba(249, 115, 22, 0)); }
.to-red-600 { --tw-gradient-to: #dc2626; }
.from-blue-600 { --tw-gradient-from: #2563eb; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(37, 99, 235, 0)); }
.to-purple-600 { --tw-gradient-to: #9333ea; }

/* 透明度 */
.bg-opacity-10 { background-color: rgba(255, 255, 255, 0.1); }
.bg-opacity-20 { background-color: rgba(255, 255, 255, 0.2); }
.bg-opacity-30 { background-color: rgba(255, 255, 255, 0.3); }
.bg-opacity-50 { background-color: rgba(255, 255, 255, 0.5); }
.bg-opacity-80 { background-color: rgba(255, 255, 255, 0.8); }
.bg-opacity-90 { background-color: rgba(255, 255, 255, 0.9); }
.border-opacity-20 { border-color: rgba(255, 255, 255, 0.2); }
.border-opacity-30 { border-color: rgba(255, 255, 255, 0.3); }
.border-opacity-50 { border-color: rgba(255, 255, 255, 0.5); }

/* 表单样式 - 基础样式 */
input[type="text"], input[type="number"], input[type="email"], select, textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #4b5563;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s ease;
    background-color: #374151;
    color: #fff;
}

/* 确保Tailwind类优先级更高 */
.bg-gray-700 {
    background-color: #374151 !important;
}

.border-gray-600 {
    border-color: #4b5563 !important;
}

.text-white {
    color: #fff !important;
}

/* 确保表单容器背景透明 */
#demographic-form {
    background-color: transparent !important;
}

/* 确保表单本身有深色背景 */
#demographic-form {
    background-color: #1f2937 !important;
}

/* 确保整个表单区域有深色背景 */
#demographic-screen {
    background-color: #1f2937 !important;
}

/* 确保主容器有深色背景 */
#demographic-screen .bg-gray-800 {
    background-color: #1f2937 !important;
}

/* 特别确保容器背景是深色 */
#demographic-screen .bg-gray-800 {
    background-color: #1f2937 !important;
}

/* 特别确保输入框和选择框的背景 */
#demographic-form input,
#demographic-form select {
    background-color: #374151 !important;
}

input[type="text"]:focus, input[type="number"]:focus, input[type="email"]:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 下拉选项样式 */
select option {
    background-color: #374151;
    color: #fff;
    padding: 0.5rem;
}

/* 确保下拉选项在深色背景下可见 */
select option:hover {
    background-color: #4b5563;
}

/* 按钮样式 */
.btn, button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #3b82f6;
    color: #fff;
}

.btn:hover, button:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #6b7280;
}

.btn-secondary:hover {
    background-color: #4b5563;
}

.btn-success {
    background-color: #10b981;
}

.btn-success:hover {
    background-color: #059669;
}

/* 特殊样式类 */
.bg-opacity-80 { background-color: rgba(31, 41, 55, 0.8); }
.bg-opacity-50 { background-color: rgba(31, 41, 55, 0.5); }

/* 透明度控制 - 修复版本 */
.bg-opacity-10 { background-color: rgba(255, 255, 255, 0.1); }
.bg-opacity-20 { background-color: rgba(255, 255, 255, 0.2); }
.bg-opacity-30 { background-color: rgba(255, 255, 255, 0.3); }
.bg-opacity-80 { background-color: rgba(255, 255, 255, 0.8); }
.bg-opacity-90 { background-color: rgba(255, 255, 255, 0.9); }
.border-opacity-20 { border-color: rgba(255, 255, 255, 0.2); }
.border-opacity-30 { border-color: rgba(255, 255, 255, 0.3); }
.border-opacity-50 { border-color: rgba(255, 255, 255, 0.5); }

/* 动画类 */
.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: .5;
    }
}

/* 游戏特定样式 */
.start-screen-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    z-index: 1000;
}

.start-screen-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.start-screen-content {
    text-align: center;
    color: white;
    max-width: 600px;
    padding: 2rem;
}

.game-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 2rem;
    background: linear-gradient(45deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.transition-container {
    background-size: cover;
    background-position: center;
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-image 0.3s ease-in-out;
}

.dialogue-box {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 15px;
    padding: 30px;
    margin: 0 auto;
    color: white;
    max-width: 800px;
    width: 90%;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.choice-button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    color: white;
    padding: 1rem 2rem;
    margin: 0.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
}

.choice-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* 渐变背景样式 */
.bg-gradient-to-br {
    background-image: linear-gradient(to bottom right, var(--tw-gradient-stops));
}

/* 缺失的样式类 */
.overflow-y-auto {
    overflow-y: auto;
}

.border-2 {
    border-width: 2px;
}

.border-yellow-400 {
    border-color: #facc15;
}

.shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* 更多缺失的样式类 */
.bg-black {
    background-color: #000;
}

.bg-opacity-30 {
    background-color: rgba(0, 0, 0, 0.3);
}

.border-purple-400 {
    border-color: #c084fc;
}

.hover\:from-blue-700:hover {
    --tw-gradient-from: #1d4ed8;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(29, 78, 216, 0));
}

.hover\:to-purple-700:hover {
    --tw-gradient-to: #7c3aed;
}

.transition-all {
    transition: all 0.15s ease-in-out;
}

.duration-300 {
    transition-duration: 300ms;
}

.transform {
    transform: translateZ(0);
}

.hover\:scale-105:hover {
    transform: scale(1.05);
}

/* 进度条和布局样式 */
.h-2 {
    height: 0.5rem;
}

.rounded-full {
    border-radius: 9999px;
}

.w-full {
    width: 100%;
}

.justify-between {
    justify-content: space-between;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.text-center {
    text-align: center;
}

.mr-2 {
    margin-right: 0.5rem;
}

/* 颜色样式 */
.bg-green-500 {
    background-color: #10b981;
}

.bg-yellow-500 {
    background-color: #f59e0b;
}

.bg-red-500 {
    background-color: #ef4444;
}

.bg-gradient-to-r {
    background-image: linear-gradient(to right, var(--tw-gradient-stops));
}

.from-yellow-600 {
    --tw-gradient-from: #d97706;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(217, 119, 6, 0));
}

.via-orange-500 {
    --tw-gradient-stops: var(--tw-gradient-from), #f97316, var(--tw-gradient-to, rgba(249, 115, 22, 0));
}

.to-red-600 {
    --tw-gradient-to: #dc2626;
}

.from-purple-600 {
    --tw-gradient-from: #9333ea;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(147, 51, 234, 0));
}

.to-blue-600 {
    --tw-gradient-to: #2563eb;
}

.from-blue-600 {
    --tw-gradient-from: #2563eb;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(37, 99, 235, 0));
}

.to-purple-600 {
    --tw-gradient-to: #9333ea;
}

/* 新增的渐变颜色 */
.from-green-500 {
    --tw-gradient-from: #10b981;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(16, 185, 129, 0));
}

.to-teal-600 {
    --tw-gradient-to: #0d9488;
}

.from-orange-500 {
    --tw-gradient-from: #f97316;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(249, 115, 22, 0));
}

.to-red-600 {
    --tw-gradient-to: #dc2626;
}

.hover\:from-blue-600:hover {
    --tw-gradient-from: #2563eb;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(37, 99, 235, 0));
}

.hover\:to-purple-700:hover {
    --tw-gradient-to: #7c3aed;
}

.hover\:from-green-600:hover {
    --tw-gradient-from: #059669;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(5, 150, 105, 0));
}

.hover\:to-teal-700:hover {
    --tw-gradient-to: #0f766e;
}

.hover\:from-orange-600:hover {
    --tw-gradient-from: #ea580c;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(234, 88, 12, 0));
}

.hover\:to-red-700:hover {
    --tw-gradient-to: #b91c1c;
}

/* 更多缺失的样式类 */
.space-y-6 > * + * { margin-top: 1.5rem; }

.hover\:shadow-xl:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.focus\:ring-2:focus {
    --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
    --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
    box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}

.focus\:ring-blue-200:focus {
    --tw-ring-color: #bfdbfe;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .game-title {
        font-size: 2rem;
    }
    
    .start-screen-content {
        padding: 1rem;
    }
}
