/* God Star - AI Investment Advisor Styles */

/* Header Gradient */
.god-star-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}

/* Card Styles */
.god-star-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Quick Amount Buttons */
.quick-amount-btn {
    flex: 1;
    padding: 0.5rem;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-amount-btn:hover {
    background: #e5e7eb;
    color: #374151;
    border-color: #d1d5db;
}

.quick-amount-btn:active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

/* Risk Slider */
.risk-slider-container {
    position: relative;
    padding: 1rem 0;
}

.risk-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #10b981 0%, #f59e0b 25%, #f59e0b 50%, #ef4444 75%, #ef4444 100%);
    outline: none;
    -webkit-appearance: none;
}

.risk-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    border: 3px solid #3b82f6;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.risk-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    border: 3px solid #3b82f6;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.risk-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.risk-label {
    flex: 1;
    text-align: center;
    transition: all 0.2s ease;
}

.risk-label.active {
    color: #3b82f6;
    font-weight: 600;
}

/* Period Buttons */
.period-btn {
    padding: 1rem;
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    color: #6b7280;
}

.period-btn:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

.period-btn.active {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* God Cards */
.god-card {
    padding: 1rem;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.god-card:hover {
    background: #ffffff;
    border-color: #d1d5db;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.god-card.active {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.god-avatar-container {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 0.75rem;
    border: 3px solid #e5e7eb;
    transition: all 0.2s ease;
}

.god-card.active .god-avatar-container {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.god-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.god-info {
    width: 100%;
}

.god-name {
    font-weight: 700;
    color: #111827;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.god-name-en {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.god-style-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.god-expertise {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.god-expertise i {
    color: #f59e0b;
}

.god-description {
    font-size: 0.7rem;
    color: #6b7280;
    line-height: 1.4;
    text-align: left;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e5e7eb;
}

/* More/Less Button */
.god-more-btn {
    grid-column: 1 / -1;
    padding: 1rem;
    background: #f3f4f6;
    border: 2px dashed #d1d5db;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #6b7280;
    font-weight: 500;
    font-size: 0.875rem;
}

.god-more-btn:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
    color: #374151;
}

.god-more-btn i {
    font-size: 1.25rem;
    transition: transform 0.2s ease;
}

.god-more-btn:hover i {
    transform: translateY(2px);
}

.god-card.hidden {
    display: none;
}

/* Market Buttons */
.market-btn {
    padding: 0.75rem 1rem;
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    color: #6b7280;
    font-size: 0.875rem;
}

.market-btn:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

.market-btn.active {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* AI Loading Animation */
.ai-loading-spinner {
    display: inline-block;
    width: 60px;
    height: 60px;
    border: 4px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.ai-loading-spinner i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    color: #3b82f6;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.analysis-steps {
    display: flex;
    justify-content: space-around;
    margin-top: 2rem;
    gap: 1rem;
}

.analysis-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #9ca3af;
}

.analysis-step.active {
    color: #3b82f6;
}

.analysis-step i {
    font-size: 1.25rem;
}

/* Stat Cards */
.stat-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1rem;
    text-align: center;
}

.stat-label {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
}

/* Allocation Chart */
.allocation-chart-container {
    position: relative;
    height: 200px;
    margin-top: 1rem;
}

/* Stock Item */
.stock-item {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.stock-item:hover {
    background: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.stock-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.stock-name {
    font-weight: 700;
    font-size: 1rem;
    color: #111827;
}

.stock-code {
    font-size: 0.875rem;
    color: #6b7280;
    margin-left: 0.5rem;
}

.stock-allocation {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.stock-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    font-size: 0.875rem;
}

@media (min-width: 640px) {
    .stock-info {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stock-info-item {
    display: flex;
    justify-content: space-between;
}

.stock-info-label {
    color: #6b7280;
}

.stock-info-value {
    font-weight: 600;
    color: #111827;
}

.stock-info-value.positive {
    color: #10b981;
}

.stock-info-value.negative {
    color: #ef4444;
}

.stock-reason {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.5;
}

.stock-reason strong {
    color: #3b82f6;
}

/* Strategy Content - Markdown Styles */
#strategy-content {
    color: #374151;
    line-height: 1.7;
}

/* 标题样式 */
#strategy-content h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e40af;
    margin: 1.5rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3b82f6;
}

#strategy-content h1:first-child {
    margin-top: 0;
}

#strategy-content h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1d4ed8;
    margin: 1.25rem 0 0.75rem 0;
    padding-left: 0.75rem;
    border-left: 4px solid #3b82f6;
}

#strategy-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #2563eb;
    margin: 1rem 0 0.5rem 0;
}

#strategy-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #1e40af;
    margin: 0.875rem 0 0.5rem 0;
}

#strategy-content h5 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e40af;
    margin: 0.75rem 0 0.5rem 0;
}

/* 段落样式 */
#strategy-content p {
    line-height: 1.7;
    margin: 0.75rem 0;
    color: #374151;
}

#strategy-content p:first-child {
    margin-top: 0;
}

#strategy-content p:last-child {
    margin-bottom: 0;
}

/* 列表样式 */
#strategy-content ul,
#strategy-content ol {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
    line-height: 1.7;
}

#strategy-content ul {
    list-style-type: disc;
}

#strategy-content ol {
    list-style-type: decimal;
}

#strategy-content li {
    margin: 0.5rem 0;
    line-height: 1.7;
    color: #374151;
}

#strategy-content ul ul,
#strategy-content ol ol,
#strategy-content ul ol,
#strategy-content ol ul {
    margin: 0.5rem 0;
}

/* 强调样式 */
#strategy-content strong {
    font-weight: 600;
    color: #111827;
}

#strategy-content em {
    font-style: italic;
    color: #4b5563;
}

#strategy-content code {
    background-color: #f3f4f6;
    color: #ef4444;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
    font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
}

#strategy-content pre {
    background-color: #1f2937;
    color: #f9fafb;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1rem 0;
    line-height: 1.6;
}

#strategy-content pre code {
    background-color: transparent;
    color: inherit;
    padding: 0;
    border-radius: 0;
    font-size: 0.875rem;
}

/* 引用样式 */
#strategy-content blockquote {
    border-left: 4px solid #3b82f6;
    padding-left: 1rem;
    margin: 1rem 0;
    color: #6b7280;
    font-style: italic;
    background-color: #f9fafb;
    padding: 0.75rem 1rem;
    border-radius: 0 0.5rem 0.5rem 0;
}

/* 链接样式 */
#strategy-content a {
    color: #3b82f6;
    text-decoration: underline;
    transition: color 0.2s;
}

#strategy-content a:hover {
    color: #2563eb;
}

/* 水平线 */
#strategy-content hr {
    border: none;
    border-top: 2px solid #e5e7eb;
    margin: 1.5rem 0;
}

/* 表格样式 */
#strategy-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

#strategy-content th,
#strategy-content td {
    border: 1px solid #e5e7eb;
    padding: 0.5rem;
    text-align: left;
}

#strategy-content th {
    background-color: #f3f4f6;
    font-weight: 600;
    color: #111827;
}

#strategy-content tr:nth-child(even) {
    background-color: #f9fafb;
}

/* Responsive Design */
@media (max-width: 640px) {
    .analysis-steps {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .analysis-step {
        flex-direction: row;
        justify-content: flex-start;
    }
    
    .stock-info {
        grid-template-columns: 1fr;
    }
    
    .grid-cols-2 {
        grid-template-columns: 1fr;
    }
    
    .grid-cols-3 {
        grid-template-columns: 1fr;
    }
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

