/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    font-weight: 400;
    color: #e2e8f0;
    background-color: #0f172a;
    min-height: 100vh;
}

.container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 2rem;
    color: #f8fafc;
}

/* 头部样式 */
header {
    background-color: #1e293b;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header .container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #3b82f6;
}

.language-switcher {
    display: flex;
    gap: 1rem;
}

.language-btn {
    background: none;
    border: 1px solid #3b82f6;
    color: #e2e8f0;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-btn:hover {
    background-color: #3b82f6;
    color: #0f172a;
}

.language-btn.active {
    background-color: #3b82f6;
    color: #0f172a;
}

/* 主内容样式 */
main {
    padding: 2rem 0;
}

/* IP位置信息样式 */
#ip-location-info {
    margin-bottom: 1.5rem;
    text-align: center;
    padding: 1rem;
    background-color: #1e293b;
    border-radius: 0.5rem;
    border: 1px solid #475569;
}

#ip-location-info div:first-child {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

#ip-location-info div:last-child {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.5rem;
}

#ip-location-info img {
    width: 32px;
    height: 24px;
}

/* 指纹卡片样式 */
.fingerprint-card {
    background-color: #1e293b;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.fingerprint-card h2 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-align: center;
    color: #f8fafc;
}

.grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s ease;
}

.info-item:hover {
    background-color: #1e293b;
}

.info-icon {
    display: flex;
    align-items: center;
    margin-right: 1rem;
}

.info-icon img {
    width: 16px;
    height: 16px;
    margin-right: 0.25rem;
    filter: invert(43%) sepia(97%) saturate(1462%) hue-rotate(200deg) brightness(97%) contrast(95%);
}

.info-label {
    color: #94a3b8;
    font-size: 16px;
    font-weight: 700;
    min-width: 120px;
}

.info-value {
    color: #e2e8f0;
    font-family: ui-monospace, monospace;
    font-size: 0.875rem;
    word-break: break-all;
    flex: 1;
}

/* 进度条样式 */
.progress-section {
    margin-bottom: 2rem;
    position: relative;
}

.progress-container {
    position: relative;
}

.progress-bar-wrapper {
    width: 100%;
    height: 32px;
    background-color: #374151;
    border-radius: 9999px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    width: 0%;
    border-radius: 9999px;
    transition: width 0.5s ease-out;
    background: linear-gradient(90deg, #3b82f6 0%, #22c55e 100%);
}

.progress-bar.success {
    background: linear-gradient(90deg, #3b82f6 0%, #22c55e 100%);
}

.progress-bar.error {
    background: #ef4444;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    z-index: 10;
}

.alert-toggle-container {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

#toggleAlertBtn {
    height: 32px;
    line-height: 32px;
    background: linear-gradient(90deg, #3b82f6 0%, #22c55e 100%);
    color: white;
    border: none;
    border-radius: 9999px;
    padding: 0 15px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    display: none;
    box-sizing: border-box;
    outline: none;
    text-align: center;
    white-space: nowrap;
}

/* 检测提示样式 */
.detection-alert {
    display: none;
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 0.5rem;
    background-color: #1e293b;
    border: 1px solid #475569;
}

.detection-alert h3 {
    color: #ff4242;
    margin-bottom: 0.5rem;
}

#detection-results {
    list-style: none;
    padding: 0;
    margin: 0;
}

#detection-results li {
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: #334155;
    border-radius: 4px;
}

#detection-results div {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

#detection-results span:first-child {
    font-weight: bold;
    color: #f8fafc;
}

#detection-results span:last-child {
    color: #999999;
}

#detection-results span.penalty {
    color: #FFF;
    background-color: #f93;
    padding: 0 0.5rem;
    border-radius: 4px;
    margin-left: 0.5rem;
}

/* 信息网格样式 */
.info-grid {
    column-count: 2;
    column-gap: 1.5rem;
}

.info-card {
    background-color: #1e293b;
    border: 1px solid #475569;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    margin-bottom: 1.5rem;
    transition: all 0.25s;
    break-inside: avoid;
}

.info-card:hover {
    background-color: #3f4f6a;
    border-color: #06b6d4;
}

.info-card h3 {
    font-weight: bold;
    margin-bottom: 0.75rem;
    color: #f8fafc;
    font-size: 1.1rem;
    border-bottom: 1px solid #475569;
    padding-bottom: 0.5rem;
}

.info-card p {
    color: #94a3b8;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.info-card .info-value {
    color: #e2e8f0;
    font-family: ui-monospace, monospace;
    font-size: 0.875rem;
    word-break: break-all;
}

.info-data {
    color: #e2e8f0;
    font-family: ui-monospace, monospace;
    font-size: 0.875rem;
    word-break: break-all;
    flex: 1;
}

.font-list-container {
    position: relative;
}

.font-list {
    max-height: 200px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.font-list.expanded {
    max-height: 500px;
}

.font-list-toggle {
    background: none;
    border: none;
    color: #3b82f6;
    cursor: pointer;
    padding: 0.5rem 0;
    text-align: right;
    width: 100%;
    font-size: 0.875rem;
}

.font-list-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.font-list-wrapper .info-data {
    flex: 1;
    min-width: 100px;
}

#fontListToggle {
    background: none;
    border: none;
    color: #3b82f6;
    cursor: pointer;
    font-size: 0.875rem;
    padding: 0;
    white-space: nowrap;
}

/* 页脚样式 */
footer {
    margin-top: 3rem;
    padding: 2rem 0;
    border-top: 1px solid #475569;
    text-align: center;
    color: #94a3b8;
    font-size: 0.875rem;
}

footer div:first-child {
    margin-bottom: 1rem;
}

footer div:last-child {
    margin-bottom: 1rem;
}

footer a {
    color: #94a3b8;
    text-decoration: none;
    margin: 0 0.5rem;
}

footer a:hover {
    color: #3b82f6;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .info-grid {
        column-count: 1;
    }
    
    .grid-container {
        grid-template-columns: 1fr !important;
    }
    
    #ip-location-info div:first-child {
        font-size: 2rem;
    }
    
    #ip-location-info div:last-child {
        font-size: 1.25rem;
    }
    
    header .container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .language-switcher {
        justify-content: center;
    }
    
    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .info-icon {
        margin-right: 0;
    }
    
    .info-label {
        min-width: unset;
    }
}