:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --bg-color: #ffffff;
    --text-color: #1e293b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    padding: 40px 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.125rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.language-switch {
    display: inline-flex;
    gap: 10px;
    background-color: #f8fafc;
    padding: 5px;
    border-radius: 8px;
}

.lang-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--secondary-color);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.lang-btn.active {
    background-color: var(--primary-color);
    color: white;
}

.lang-btn:hover:not(.active) {
    background-color: #e2e8f0;
}

main {
    padding: 40px 0;
}

.fingerprint-score {
    text-align: center;
    margin-bottom: 60px;
}

.fingerprint-score h2 {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: var(--text-color);
}

.score-circle {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
}

.score-circle svg {
    transform: rotate(-90deg);
}

.score-bg {
    fill: none;
    stroke: #f3f4f6;
    stroke-width: 10;
}

.score-progress {
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 565.48;
    stroke-dashoffset: 565.48;
    transition: stroke-dashoffset 1s ease-out, stroke 0.3s;
}

.score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.score-value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-color);
}

.score-label {
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.score-description {
    font-size: 1.125rem;
    color: var(--secondary-color);
    max-width: 600px;
    margin: 0 auto;
}

.fingerprint-details {
    background-color: #f8fafc;
    padding: 40px;
    border-radius: 12px;
    margin-bottom: 40px;
}

.fingerprint-details h2 {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: var(--text-color);
}

.detail-section {
    background-color: white;
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.detail-section h3 {
    font-size: 1.125rem;
    margin-bottom: 16px;
    color: var(--text-color);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-label {
    font-size: 0.875rem;
    color: var(--secondary-color);
    font-weight: 500;
}

.info-value {
    font-size: 0.9375rem;
    color: var(--text-color);
    word-break: break-all;
}

.canvas-container {
    text-align: center;
}

#fingerprintCanvas {
    border: 1px solid var(--border-color);
    margin-bottom: 10px;
    display: inline-block;
}

.canvas-hash {
    font-family: monospace;
    font-size: 0.875rem;
    color: var(--secondary-color);
}

.audio-info {
    display: flex;
    gap: 16px;
}

.fonts-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.font-item {
    padding: 4px 12px;
    background-color: #e2e8f0;
    border-radius: 4px;
    font-size: 0.875rem;
    color: var(--text-color);
}

.loading {
    color: var(--secondary-color);
    font-style: italic;
}

.privacy-tips {
    background-color: #fef3c7;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 40px;
}

.privacy-tips h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text-color);
}

.tips-list {
    list-style: none;
    padding-left: 0;
}

.tips-list li {
    padding: 8px 0 8px 30px;
    position: relative;
    color: #92400e;
}

.tips-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #f59e0b;
    font-weight: bold;
}

.action-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 40px;
}

.btn-primary,
.btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: #f0f9ff;
}

footer {
    text-align: center;
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
    color: var(--secondary-color);
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    .fingerprint-details {
        padding: 20px;
    }
    
    .detail-section {
        padding: 16px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin: 0 auto 40px;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #0f172a;
        --text-color: #f1f5f9;
        --border-color: #334155;
        --secondary-color: #94a3b8;
    }
    
    .fingerprint-details {
        background-color: #1e293b;
    }
    
    .detail-section {
        background-color: #0f172a;
    }
    
    .language-switch {
        background-color: #1e293b;
    }
    
    .lang-btn:hover:not(.active) {
        background-color: #334155;
    }
    
    .font-item {
        background-color: #334155;
    }
    
    .privacy-tips {
        background-color: #422006;
    }
    
    .tips-list li {
        color: #fbbf24;
    }
    
    .btn-secondary {
        background-color: #1e293b;
        border-color: var(--primary-color);
    }
    
    .btn-secondary:hover {
        background-color: #334155;
    }
}