:root {
    --primary-color: #0052CC;
    --primary-hover: #0747A6;
    --secondary-color: #6B778C;
    --success-color: #00875A;
    --danger-color: #DE350B;
    --background: #FAFBFC;
    --surface: #FFFFFF;
    --text-primary: #172B4D;
    --text-secondary: #5E6C84;
    --border: #DFE1E6;
    --border-focus: #4C9AFF;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --radius: 8px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
}

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

/* Language Selector */
.language-selector {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

#languageSelect {
    padding: 8px 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

#languageSelect:hover {
    border-color: var(--border-focus);
    box-shadow: var(--shadow-md);
}

/* Header */
.header {
    text-align: center;
    margin: 40px 0;
    color: white;
}

.header h1 {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.subtitle {
    font-size: 1.2em;
    opacity: 0.95;
}

/* Upload Section */
.upload-section {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
}

.drop-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--background);
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: var(--primary-color);
    background: rgba(76, 154, 255, 0.05);
}

.upload-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    color: var(--secondary-color);
}

.drop-text {
    font-size: 1.3em;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.drop-subtext {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.file-input-label {
    display: inline-block;
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius);
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.file-input-label:hover {
    background: var(--primary-hover);
}

#fileInput {
    display: none;
}

/* Comparison Section */
.comparison-section {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
    display: none;
}

.comparison-section h2 {
    margin-bottom: 20px;
    color: var(--text-primary);
}

.comparison-input {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#compareInput {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: monospace;
}

#compareInput:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(76, 154, 255, 0.1);
}

/* Results Section */
.results-section {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
    display: none;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.results-header h2 {
    color: var(--text-primary);
}

.results-actions {
    display: flex;
    gap: 10px;
}

.results-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.result-card {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: all 0.3s ease;
}

.result-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.file-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.file-info h3 {
    color: var(--text-primary);
    font-size: 1.1em;
}

.file-size {
    color: var(--text-secondary);
    font-size: 0.9em;
}

.hash-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hash-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hash-label {
    min-width: 80px;
    font-weight: 600;
    color: var(--text-secondary);
}

.hash-value {
    flex: 1;
    font-family: monospace;
    font-size: 0.9em;
    word-break: break-all;
    padding: 8px;
    background: var(--surface);
    border-radius: 4px;
    color: var(--text-primary);
}

.copy-btn {
    padding: 6px 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    transition: background 0.3s ease;
}

.copy-btn:hover {
    background: var(--primary-hover);
}

/* Buttons */
.btn-primary,
.btn-secondary {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

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

.btn-secondary {
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--background);
}

/* Comparison Result */
.comparison-result {
    padding: 15px;
    border-radius: var(--radius);
    font-weight: 500;
}

.match-found {
    background: rgba(0, 135, 90, 0.1);
    color: var(--success-color);
    padding: 15px;
    border-radius: var(--radius);
}

.no-match {
    background: rgba(222, 53, 11, 0.1);
    color: var(--danger-color);
    padding: 15px;
    border-radius: var(--radius);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-overlay p {
    color: white;
    margin-top: 20px;
    font-size: 1.1em;
}

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

/* Features Section */
.features {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
}

.features h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-primary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.feature-card {
    text-align: center;
    padding: 25px;
    background: var(--background);
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 2.5em;
    margin-bottom: 15px;
}

.feature-card h3 {
    color: var(--text-primary);
    margin-bottom: 10px;
    font-size: 1.1em;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95em;
}

/* How to Use Section */
.how-to-use {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
}

.how-to-use h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-primary);
}

.steps {
    max-width: 600px;
    margin: 0 auto;
    counter-reset: step-counter;
}

.steps li {
    counter-increment: step-counter;
    margin-bottom: 20px;
    padding-left: 50px;
    position: relative;
    color: var(--text-primary);
}

.steps li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    background: var(--primary-color);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* FAQ Section */
.faq {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
}

.faq h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-primary);
}

.faq-item {
    margin-bottom: 25px;
    padding: 20px;
    background: var(--background);
    border-radius: var(--radius);
}

.faq-item h3 {
    color: var(--text-primary);
    margin-bottom: 10px;
    font-size: 1.1em;
}

.faq-item p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    .upload-section,
    .comparison-section,
    .results-section,
    .features,
    .how-to-use,
    .faq {
        padding: 20px;
    }
    
    .drop-zone {
        padding: 40px 20px;
    }
    
    .comparison-input {
        flex-direction: column;
    }
    
    .results-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .hash-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .hash-label {
        min-width: auto;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
}