* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 2.5em;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.upload-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 2px dashed #ddd;
    transition: all 0.3s ease;
}

.upload-section:hover {
    border-color: #667eea;
    transform: translateY(-2px);
}

.upload-area {
    text-align: center;
    padding: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover {
    background: rgba(102, 126, 234, 0.05);
}

.upload-icon {
    font-size: 3em;
    color: #667eea;
    margin-bottom: 15px;
}

#fontFile {
    display: none;
}

.upload-text {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 10px;
}

.supported-formats {
    font-size: 0.9em;
    color: #999;
    font-style: italic;
}

.font-info {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: none;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: bold;
    color: #333;
}

.info-value {
    color: #666;
    font-family: monospace;
    background: #f5f5f5;
    padding: 5px 10px;
    border-radius: 5px;
}

.test-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: none;
}

.test-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.test-title {
    font-size: 1.4em;
    color: #333;
    font-weight: bold;
}

.font-size-slider {
    display: flex;
    align-items: center;
    gap: 10px;
}

.slider {
    width: 150px;
    height: 5px;
    border-radius: 5px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
}

.test-content {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 25px;
    margin-top: 15px;
    border: 1px solid #eee;
    line-height: 1.6;
}

.editable-text {
    background: transparent;
    border: none;
    outline: none;
    width: 100%;
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

.test-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tab-btn {
    background: #f0f0f0;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.tab-btn.active {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.tab-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
}

.character-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.char-item {
    background: white;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.char-item:hover {
    transform: scale(1.1);
}

.error-message {
    background: #ffe6e6;
    border: 1px solid #ff9999;
    color: #cc0000;
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    text-align: center;
}

.success-message {
    background: #e6ffe6;
    border: 1px solid #99ff99;
    color: #006600;
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    text-align: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.responsive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 2em;
    }

    .test-header {
        flex-direction: column;
        gap: 15px;
    }

    .test-tabs {
        justify-content: center;
    }
}