Spaces:
Running
on
Zero
Running
on
Zero
File size: 34,198 Bytes
d8f7637 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 |
def get_css_styles():
return """
.dog-info-card {
margin: 0 0 20px 0;
padding: 0;
border-radius: 12px;
box-shadow: 0 2px 12px rgba(0,0,0,0.08);
overflow: hidden;
transition: all 0.3s ease;
background: white;
border: 1px solid #e1e4e8;
position: relative;
}
.dog-info-card:hover {
box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.dog-info-card:before {
content: '';
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 8px;
background-color: inherit;
}
.dog-info-header {
padding: 24px 28px; /* 增加內距 */
margin: 0;
font-size: 22px;
font-weight: bold;
border-bottom: 1px solid #e1e4e8;
}
.dog-info-header {
background-color: transparent;
}
.colored-border {
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 8px;
}
.dog-info-header {
border-left-width: 8px;
border-left-style: solid;
}
.breed-info {
padding: 28px; /* 增加整體內距 */
line-height: 1.6;
font-size: 1rem;
border: none;
}
.section-title {
font-size: 1.2em !important;
font-weight: 700;
color: #2c3e50;
margin: 32px 0 20px 0;
padding: 12px 0;
border-bottom: 2px solid #e1e4e8;
text-transform: uppercase;
letter-spacing: 0.5px;
display: flex;
align-items: center;
gap: 8px;
position: relative;
}
.section-header {
color: #2c3e50;
font-size: 1.15rem;
font-weight: 600;
margin: 20px 0 12px 0;
display: flex;
align-items: center;
gap: 8px;
}
.icon {
font-size: 1.2em;
display: inline-flex;
align-items: center;
justify-content: center;
}
.info-section, .care-section, .family-section {
display: flex;
flex-wrap: wrap;
gap: 16px;
margin-bottom: 28px; /* 增加底部間距 */
padding: 20px; /* 增加內距 */
background: #f8f9fa;
border-radius: 12px;
border: 1px solid #e1e4e8; /* 添加邊框 */
}
.info-item {
background: white; /* 改為白色背景 */
padding: 14px 18px; /* 增加內距 */
border-radius: 8px;
display: flex;
align-items: center;
gap: 10px;
box-shadow: 0 2px 4px rgba(0,0,0,0.05);
border: 1px solid #e1e4e8;
flex: 1 1 auto;
min-width: 200px;
}
.label {
color: #666;
font-weight: 600;
font-size: 1.1rem;
}
.value {
color: #2c3e50;
font-weight: 500;
font-size: 1.1rem;
}
.temperament-section {
background: #f8f9fa;
padding: 20px; /* 增加內距 */
border-radius: 12px;
margin-bottom: 28px; /* 增加間距 */
color: #444;
border: 1px solid #e1e4e8; /* 添加邊框 */
}
.description-section {
background: #f8f9fa;
padding: 24px; /* 增加內距 */
border-radius: 12px;
margin: 28px 0; /* 增加上下間距 */
line-height: 1.8;
color: #444;
border: 1px solid #e1e4e8; /* 添加邊框 */
fontsize: 1.1rem;
}
.description-section p {
margin: 0;
padding: 0;
text-align: justify; /* 文字兩端對齊 */
word-wrap: break-word; /* 確保長單字會換行 */
white-space: pre-line; /* 保留換行但合併空白 */
max-width: 100%; /* 確保不會超出容器 */
}
.action-section {
margin-top: 24px;
text-align: center;
}
.akc-button,
.breed-section .akc-link,
.breed-option .akc-link {
display: inline-flex;
align-items: center;
padding: 14px 28px;
background: linear-gradient(145deg, #00509E, #003F7F);
color: white;
border-radius: 12px; /* 增加圓角 */
text-decoration: none;
gap: 12px; /* 增加圖標和文字間距 */
transition: all 0.3s ease;
font-weight: 600;
font-size: 1.1em;
box-shadow:
0 2px 4px rgba(0,0,0,0.1),
inset 0 1px 1px rgba(255,255,255,0.1);
border: 1px solid rgba(255,255,255,0.1);
}
.akc-button:hover,
.breed-section .akc-link:hover,
.breed-option .akc-link:hover {
background: linear-gradient(145deg, #003F7F, #00509E);
transform: translateY(-2px);
color: white;
box-shadow:
0 6px 12px rgba(0,0,0,0.2),
inset 0 1px 1px rgba(255,255,255,0.2);
border: 1px solid rgba(255,255,255,0.2);
}
.icon {
font-size: 1.3em;
filter: drop-shadow(0 1px 1px rgba(0,0,0,0.2));
}
.warning-message {
display: flex;
align-items: center;
gap: 8px;
color: #ff3b30;
font-weight: 500;
margin: 0;
padding: 16px;
background: #fff5f5;
border-radius: 8px;
}
.model-uncertainty-note {
display: flex;
align-items: center;
gap: 12px;
padding: 16px;
background-color: #f8f9fa;
margin-bottom: 20px;
color: #495057;
border-radius: 4px;
}
.breeds-list {
display: flex;
flex-direction: column;
gap: 20px;
}
.breed-option {
background: white;
border: 1px solid #e1e4e8;
border-radius: 8px;
overflow: hidden;
}
.breed-header {
display: flex;
align-items: center;
padding: 16px;
background: #f8f9fa;
gap: 12px;
border-bottom: 1px solid #e1e4e8;
}
.option-number {
font-weight: 600;
color: #666;
padding: 4px 8px;
background: #e1e4e8;
border-radius: 4px;
}
.option-item {
padding: 15px;
margin-bottom: 10px;
border-bottom: 1px solid #ddd;
}
.option-item:last-child {
border-bottom: none; /* 最後一個選項去除邊線 */
}
.breed-name {
font-size: 1.2em !important; # 從 1.5em 改為 1.2em
font-weight: bold;
color: #2c3e50;
flex-grow: 1;
}
.confidence-badge {
padding: 4px 12px;
border-radius: 20px;
font-size: 0.9em;
font-weight: 500;
}
.breed-content {
padding: 20px;
}
.breed-content li {
margin-bottom: 8px;
display: flex;
align-items: flex-start; /* 改為頂部對齊 */
gap: 8px;
flex-wrap: wrap; /* 允許內容換行 */
}
.breed-content li strong {
flex: 0 0 auto; /* 不讓標題縮放 */
min-width: 100px; /* 給標題一個固定最小寬度 */
}
ul {
padding-left: 0;
margin: 0;
list-style-type: none;
}
li {
margin-bottom: 8px;
display: flex;
align-items: center;
gap: 8px;
}
.action-section {
margin-top: 20px;
padding: 15px;
text-align: center;
border-top: 1px solid #dee2e6;
}
.akc-button {
display: inline-block;
padding: 12px 24px;
background-color: #007bff;
color: white !important;
text-decoration: none;
border-radius: 5px;
font-weight: 500;
transition: background-color 0.3s;
}
.akc-button:hover {
background-color: #0056b3;
text-decoration: none;
}
.akc-button .icon {
margin-right: 8px;
}
.akc-link {
color: white;
text-decoration: none;
font-weight: 600;
font-size: 1.1em;
transition: all 0.3s ease;
}
.akc-link:hover {
text-decoration: underline;
color: #D3E3F0;
}
.tooltip {
position: relative;
display: inline-flex;
align-items: center;
gap: 4px;
cursor: help;
}
.tooltip .tooltip-icon {
font-size: 14px;
color: #666;
}
.tooltip .tooltip-text {
visibility: hidden;
width: 250px;
background-color: rgba(44, 62, 80, 0.95);
color: white;
text-align: left;
border-radius: 8px;
padding: 8px 10px;
position: absolute;
z-index: 100;
bottom: 150%;
left: 50%;
transform: translateX(-50%);
opacity: 0;
transition: all 0.3s ease;
font-size: 14px;
line-height: 1.3;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
border: 1px solid rgba(255, 255, 255, 0.1)
margin-bottom: 10px;
}
.tooltip.tooltip-left .tooltip-text {
left: 0;
transform: translateX(0);
}
.tooltip.tooltip-right .tooltip-text {
left: auto;
right: 0;
transform: translateX(0);
}
.tooltip-text strong {
color: white !important;
background-color: transparent !important;
display: block; /* 讓標題獨立一行 */
margin-bottom: 2px; /* 增加標題下方間距 */
padding-bottom: 2px; /* 加入小間距 */
border-bottom: 1px solid rgba(255,255,255,0.2);
}
.tooltip-text {
font-size: 13px; /* 稍微縮小字體 */
}
/* 調整列表符號和文字的間距 */
.tooltip-text ul {
margin: 0;
padding-left: 15px; /* 減少列表符號的縮進 */
}
.tooltip-text li {
margin-bottom: 1px; /* 減少列表項目間的間距 */
}
.tooltip-text br {
line-height: 1.2; /* 減少行距 */
}
.tooltip .tooltip-text::after {
content: "";
position: absolute;
top: 100%;
left: 20%; /* 調整箭頭位置 */
margin-left: -5px;
border-width: 5px;
border-style: solid;
border-color: rgba(44, 62, 80, 0.95) transparent transparent transparent;
}
.tooltip-left .tooltip-text::after {
left: 20%;
}
/* 右側箭頭 */
.tooltip-right .tooltip-text::after {
left: 80%;
}
.tooltip:hover .tooltip-text {
visibility: visible;
opacity: 1;
}
.tooltip .tooltip-text::after {
content: "";
position: absolute;
top: 100%;
left: 50%;
transform: translateX(-50%);
border-width: 8px;
border-style: solid;
border-color: rgba(44, 62, 80, 0.95) transparent transparent transparent;
}
.uncertainty-mode .tooltip .tooltip-text {
position: absolute;
left: 100%;
bottom: auto;
top: 50%;
transform: translateY(-50%);
margin-left: 10px;
z-index: 1000; /* 確保提示框在最上層 */
}
.uncertainty-mode .tooltip .tooltip-text::after {
content: "";
position: absolute;
top: 50%;
right: 100%;
transform: translateY(-50%);
border-width: 5px;
border-style: solid;
border-color: transparent rgba(44, 62, 80, 0.95) transparent transparent;
}
.uncertainty-mode .breed-content {
font-size: 1rem !important; /* 增加字體大小 */
}
.description-section,
.description-section p,
.temperament-section,
.temperament-section .value,
.info-item,
.info-item .value,
.breed-content {
font-size: 1rem !important; /* 使用 !important 確保覆蓋其他樣式 */
}
.recommendation-card {
margin-bottom: 40px;
}
.compatibility-scores {
background: #f8f9fa;
padding: 24px;
border-radius: 12px;
margin: 20px 0;
}
.score-item {
margin: 15px 0;
}
.progress-bar {
height: 12px;
background-color: #e9ecef;
border-radius: 6px;
overflow: hidden;
margin: 8px 0;
}
.progress {
height: 100%;
background: linear-gradient(90deg, #34C759, #30B350);
border-radius: 6px;
transition: width 0.6s ease;
}
.percentage {
float: right;
color: #34C759;
font-weight: 600;
}
.breed-details-section {
margin: 30px 0;
}
.subsection-title {
font-size: 1.2em;
color: #2c3e50;
margin-bottom: 20px;
display: flex;
align-items: center;
gap: 8px;
}
.details-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 20px;
background: #f8f9fa;
padding: 20px;
border-radius: 12px;
border: 1px solid #e1e4e8;
}
.detail-item {
background: white;
padding: 15px;
border-radius: 8px;
border: 1px solid #e1e4e8;
}
.description-text {
line-height: 1.8;
color: #444;
margin: 0;
padding: 24px 30px; /* 調整內部間距,從 20px 改為 24px 30px */
background: #f8f9fa;
border-radius: 12px;
border: 1px solid #e1e4e8;
text-align: justify; /* 添加文字對齊 */
word-wrap: break-word; /* 確保長文字會換行 */
word-spacing: 1px; /* 加入字間距 */
}
/* 工具提示改進 */
.tooltip {
position: relative;
display: inline-flex;
align-items: center;
gap: 4px;
cursor: help;
padding: 5px 0;
}
.tooltip .tooltip-text {
visibility: hidden;
width: 280px;
background-color: rgba(44, 62, 80, 0.95);
color: white;
text-align: left;
border-radius: 8px;
padding: 12px 15px;
position: absolute;
z-index: 1000;
bottom: calc(100% + 15px);
left: 50%;
transform: translateX(-50%);
opacity: 0;
transition: all 0.3s ease;
font-size: 14px;
line-height: 1.4;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
white-space: normal;
}
.tooltip:hover .tooltip-text {
visibility: visible;
opacity: 1;
}
.score-badge {
background-color: #34C759;
color: white;
padding: 6px 12px;
border-radius: 20px;
font-size: 0.9em;
margin-left: 10px;
font-weight: 500;
box-shadow: 0 2px 4px rgba(52, 199, 89, 0.2);
}
.bonus-score .tooltip-text {
width: 250px;
line-height: 1.4;
padding: 10px;
}
.bonus-score .progress {
background: linear-gradient(90deg, #48bb78, #68d391);
}
.health-section {
margin: 25px 0;
padding: 24px;
background-color: #f8f9fb;
border-radius: 12px;
border: 1px solid #e1e4e8;
}
.health-section .subsection-title {
font-size: 1.3em;
font-weight: 600;
margin-bottom: 20px;
display: flex;
align-items: center;
gap: 8px;
color: #2c3e50;
}
.health-info {
background-color: white;
padding: 24px;
border-radius: 8px;
margin: 15px 0;
border: 1px solid #e1e4e8;
}
.health-details {
font-size: 1.1rem;
line-height: 1.6;
}
.health-details h4 {
color: #2c3e50;
font-size: 1.15rem;
font-weight: 600;
margin: 20px 0 15px 0;
}
.health-details h4:first-child {
margin-top: 0;
}
.health-details ul {
list-style-type: none;
padding-left: 0;
margin: 0 0 25px 0;
}
.health-details ul li {
margin-bottom: 12px;
padding-left: 20px;
position: relative;
}
.health-details ul li:before {
content: "•";
position: absolute;
left: 0;
color: #2c3e50;
}
.health-item:before {
content: "•";
color: #dc3545;
font-weight: bold;
}
.health-item.screening:before {
color: #28a745;
}
/* 區塊間距 */
.health-block, .noise-block {
margin-bottom: 24px;
}
.health-disclaimer {
margin-top: 20px;
padding-top: 20px;
border-top: 1px solid #e1e4e8;
}
.health-disclaimer p {
margin: 6px 0;
padding-left: 20px;
position: relative;
color: #888; /* 統一設定灰色 */
font-size: 0.95rem;
line-height: 1.5;
font-style: italic;
}
.health-disclaimer p:before {
content: "›";
position: absolute;
left: 0;
color: #999;
font-style: normal;
font-weight: 500;
}
.health-disclaimer p:first-child {
font-style: normal; /* 取消斜體 */
font-weight: 500; /* 加粗 */
color: #666; /* 稍深的灰色 */
}
.health-disclaimer p span,
.health-disclaimer p strong,
.health-disclaimer p em {
color: inherit;
}
.health-list li:before {
content: "•";
color: #dc3545;
}
.history-container {
max-width: 800px;
margin: 0 auto;
padding: 20px;
}
.history-entry {
background-color: #f8f9fa;
border-radius: 8px;
padding: 15px;
margin-bottom: 20px;
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.history-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
padding-bottom: 10px;
border-bottom: 1px solid #eee;
}
.timestamp {
color: #666;
font-size: 0.9em;
}
.delete-btn {
background: none;
border: none;
cursor: pointer;
font-size: 1.2em;
padding: 5px;
}
.delete-btn:hover {
color: #dc3545;
}
.search-params ul {
list-style: none;
padding-left: 20px;
}
.search-params li {
margin: 5px 0;
color: #555;
}
.top-results ol {
padding-left: 25px;
}
.top-results li {
margin: 5px 0;
color: #333;
}
.breed-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px 16px;
margin: 8px 0;
background-color: white;
border-radius: 6px;
border: 1px solid #e1e4e8;
transition: all 0.2s ease;
}
.breed-item:hover {
transform: translateX(5px);
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.breed-rank {
font-weight: 600;
color: #666;
margin-right: 12px;
min-width: 30px;
}
.breed-name {
flex: 1;
font-weight: 500;
color: #2c3e50;
padding: 0 12px;
}
.breed-score {
font-weight: 600;
color: #34C759;
padding: 4px 8px;
border-radius: 20px;
background-color: rgba(52, 199, 89, 0.1);
min-width: 70px;
text-align: center;
}
.history-entry {
background-color: #f8f9fa;
border-radius: 12px;
padding: 20px;
margin-bottom: 25px;
box-shadow: 0 2px 8px rgba(0,0,0,0.05);
border: 1px solid #e1e4e8;
}
.history-header {
margin-bottom: 15px;
padding-bottom: 12px;
border-bottom: 1px solid #e1e4e8;
}
.history-header .timestamp {
color: #666;
font-size: 0.9em;
display: flex;
align-items: center;
gap: 6px;
}
h4 {
color: #2c3e50;
font-size: 1.15rem;
font-weight: 600;
margin: 20px 0 12px 0;
}
.params-list ul {
list-style: none;
padding-left: 0;
margin: 10px 0;
}
.params-list li {
margin: 8px 0;
color: #4a5568;
display: flex;
align-items: center;
}
.empty-history {
text-align: center;
padding: 40px 20px;
color: #666;
font-size: 1.1em;
background-color: #f8f9fa;
border-radius: 12px;
border: 1px dashed #e1e4e8;
margin: 20px 0;
}
.noise-section {
margin: 25px 0;
padding: 24px;
background-color: #f8f9fb;
border-radius: 12px;
border: 1px solid #e1e4e8;
}
.noise-info {
background-color: white;
padding: 24px;
border-radius: 8px;
margin: 15px 0;
border: 1px solid #e1e4e8;
}
.noise-details {
font-size: 1.1rem;
line-height: 1.6;
}
.noise-level {
margin-bottom: 20px;
padding: 10px 15px;
background: #f8f9fa;
border-radius: 6px;
font-weight: 500;
}
.noise-level-block {
background: #f8f9fa;
padding: 20px;
border-radius: 8px;
margin: 20px 0;
}
.noise-level-display {
background: #f8f9fa;
padding: 16px;
border-radius: 8px;
margin: 16px 0;
}
.level-indicator {
background: white;
padding: 12px 16px;
border-radius: 8px;
border: 1px solid #e1e4e8;
display: flex;
align-items: center;
justify-content: space-between;
}
.level-text {
font-weight: 500;
color: #2c3e50;
}
.level-bars {
display: flex;
gap: 4px;
}
.level-bars .bar {
width: 4px;
height: 16px;
background: #e9ecef;
border-radius: 2px;
}
.level-indicator.low .bar:nth-child(1) {
background: #4CAF50;
}
.level-indicator.medium .bar:nth-child(1),
.level-indicator.medium .bar:nth-child(2) {
background: #FFA726;
}
.level-indicator.high .bar {
background: #EF5350;
}
.feature-list, .health-list, .screening-list {
list-style: none;
padding: 0;
margin: 16px 0;
display: grid;
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
gap: 12px;
}
.feature-list li, .health-list li, .screening-list li {
background: white;
padding: 12px 16px;
border-radius: 6px;
border: 1px solid #e1e4e8;
display: flex;
align-items: center;
gap: 8px;
font-size: 0.95rem;
}
.feature-list li:before {
content: "•";
color: #2c3e50;
}
.noise-notes {
font-family: inherit;
white-space: pre-wrap;
margin: 15px 0;
padding: 0;
background: transparent;
border: none;
font-size: 1.1rem;
line-height: 1.6;
color: #333;
}
.characteristics-block, .health-considerations, .health-screenings {
margin-bottom: 24px;
}
.characteristics-block h4, .health-considerations h4, .health-screenings h4 {
color: #2c3e50;
font-size: 1.1em;
font-weight: 600;
margin-bottom: 12px;
}
.characteristics-list,
.triggers-list,
.health-considerations-list,
.health-screenings-list {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 12px;
margin: 16px 0;
}
.noise-details, .health-details {
font-size: 1.1rem;
line-height: 1.6;
}
.noise-details ul, .health-details ul {
list-style: none;
padding-left: 0;
margin: 0 0 20px 0;
}
.noise-details li, .health-details li {
padding-left: 20px;
position: relative;
margin-bottom: 10px;
line-height: 1.5;
}
.noise-details li:before, .health-details li:before {
content: "•";
position: absolute;
left: 0;
color: #666;
}
.noise-section, .health-section {
margin: 25px 0;
padding: 24px;
background-color: #f8f9fb;
border-radius: 12px;
border: 1px solid #e1e4e8;
}
.noise-info, .health-info {
background-color: white;
padding: 24px;
border-radius: 8px;
margin: 15px 0;
border: 1px solid #e1e4e8;
}
.breed-info .description-tooltip {
position: relative;
display: inline-flex;
align-items: center;
gap: 4px;
cursor: help;
}
.description-tooltip .tooltip-icon {
font-size: 14px;
color: #666;
margin-left: 4px;
cursor: help;
}
.description-tooltip .tooltip-text {
visibility: hidden;
width: 280px;
background-color: rgba(44, 62, 80, 0.95);
color: white;
text-align: left;
border-radius: 8px;
padding: 12px 15px;
position: absolute;
z-index: 1000;
bottom: calc(100% + 15px);
left: 50%;
transform: translateX(-50%);
opacity: 0;
transition: all 0.3s ease;
font-size: 14px;
line-height: 1.4;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
white-space: normal;
}
.description-tooltip:hover .tooltip-text {
visibility: visible;
opacity: 1;
}
.description-tooltip .tooltip-text::after {
content: "";
position: absolute;
top: 100%;
left: 50%;
transform: translateX(-50%);
border-width: 8px;
border-style: solid;
border-color: rgba(44, 62, 80, 0.95) transparent transparent transparent;
}
.description-header {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 10px;
}
.description-header h3 {
margin: 0;
font-size: 1.2em;
color: #2c3e50;
}
.screening-list li:before {
content: "•";
color: #28a745;
}
.noise-disclaimer, .health-disclaimer {
margin-top: 20px;
padding-top: 20px;
border-top: 1px solid #e1e4e8;
color: #666;
}
.noise-disclaimer p, .health-disclaimer p {
margin: 8px 0;
padding-left: 20px;
position: relative;
}
.noise-disclaimer p:before, .health-disclaimer p:before {
content: "›";
position: absolute;
left: 0;
color: #999;
}
.disclaimer-text {
margin: 8px 0;
padding-left: 20px;
position: relative;
font-size: 0.95rem;
line-height: 1.5;
font-style: italic;
color: #888;
}
.disclaimer-text:before {
content: "›";
position: absolute;
left: 0;
color: #999;
font-style: normal;
font-weight: 500;
}
.list-item {
background: white;
padding: 12px 16px;
border-radius: 8px;
border: 1px solid #e1e4e8;
display: flex;
align-items: center;
gap: 8px;
margin: 4px 0;
font-size: 0.95rem;
color: #2c3e50;
}
.source-text {
font-style: normal !important;
font-weight: 500 !important;
color: #666 !important;
}
.health-grid, .noise-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
gap: 12px;
margin: 16px 0;
}
.health-item, .noise-item {
background: white;
padding: 12px 16px;
border-radius: 8px;
border: 1px solid #e1e4e8;
display: flex;
align-items: center;
gap: 8px;
transition: all 0.2s ease;
}
.health-item:hover, .noise-item:hover {
transform: translateY(-1px);
box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
@media (max-width: 768px) {
/* 在小螢幕上改為單列顯示 */
.health-grid, .noise-grid {
grid-template-columns: 1fr;
}
/* 減少內邊距 */
.health-section, .noise-section {
padding: 16px;
}
/* 調整字體大小 */
.section-header {
font-size: 1rem;
}
/* 調整項目內邊距 */
.health-item, .noise-item {
padding: 10px 14px;
}
}
/* 較小的手機螢幕 */
@media (max-width: 480px) {
.health-grid, .noise-grid {
gap: 8px;
}
.health-item, .noise-item {
padding: 8px 12px;
font-size: 0.9rem;
}
}
.expandable-section {
margin-top: 1rem;
}
.expand-header {
cursor: pointer;
padding: 0.5rem;
background-color: #f3f4f6;
border-radius: 0.375rem;
display: flex;
justify-content: space-between;
align-items: center;
}
.expand-header:hover {
background-color: #e5e7eb;
}
.expand-icon {
transition: transform 0.2s;
}
.expandable-section[open] .expand-icon {
transform: rotate(180deg);
}
.expanded-content {
padding: 1rem;
background-color: #ffffff;
border-radius: 0.375rem;
margin-top: 0.5rem;
}
.info-cards > div:first-child .tooltip .tooltip-text,
.info-cards > div:nth-child(3n+1) .tooltip .tooltip-text {
left: calc(100% + 20px); /* 向右移動更多 */
}
.info-cards > div:first-child .tooltip .tooltip-text::after,
.info-cards > div:nth-child(3n+1) .tooltip .tooltip-text::after {
right: calc(100% - 2px); /* 向右移動箭頭 */
}
.section-header h3 .tooltip .tooltip-text {
left: calc(100% + 20px); /* 向右移動更多 */
}
.section-header h3 .tooltip .tooltip-text::after {
right: calc(100% - 2px); /* 向右移動箭頭 */
}
"""
|