@font-face {
    font-family: 'Jomolhari';
    src: url('Jomolhari-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

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

body {
    font-family: 'Jomolhari', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #f8f9fa 0%, #ecf0f1 100%);
    min-height: 100vh;
    padding: 20px;
    font-size: 18px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(44, 62, 80, 0.1);
    overflow: hidden;
    border: 1px solid #d5dce5;
}

header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 40px;
    text-align: center;
    box-shadow: 0 2px 15px rgba(44, 62, 80, 0.15);
}

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.3);
}

.subtitle {
    font-size: 1.3rem;
    opacity: 0.95;
    font-weight: 300;
    text-shadow: 0 1px 5px rgba(255, 255, 255, 0.2);
}

main {
    padding: 40px;
}

.input-section {
    margin-bottom: 40px;
}

label {
    display: block;
    margin-bottom: 15px;
}

.label-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    display: block;
    margin-bottom: 5px;
}

.label-hint {
    font-size: 1.1rem;
    color: #7f8c8d;
}

textarea {
    width: 100%;
    padding: 20px;
    font-size: 1.4rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    resize: vertical;
    font-family: 'Jomolhari', -apple-system, sans-serif;
    transition: border-color 0.3s ease;
    background-color: #fafafa;
    line-height: 1.8;
}

textarea:focus {
    outline: none;
    border-color: #3498db;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.button-group {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

button {
    padding: 15px 40px;
    font-size: 1.3rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: 'Jomolhari', -apple-system, sans-serif;
}

.primary-btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    flex: 2;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.25);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.35);
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
}

.primary-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.secondary-btn {
    background: linear-gradient(135deg, #ecf0f1 0%, #dfe6e9 100%);
    color: #2c3e50;
    flex: 1;
    border: 1px solid #bdc3c7;
}

.secondary-btn:hover {
    background: linear-gradient(135deg, #dfe6e9 0%, #d0d7dc 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.15);
}

.results-section {
    margin-top: 40px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #d5dce5;
    box-shadow: 0 2px 10px rgba(44, 62, 80, 0.08);
}

.results-section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 2rem;
}

.statistics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: #ffffff;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(44, 62, 80, 0.08);
    border: 1px solid #d5dce5;
}

.stat-number {
    font-size: 2.4rem;
    font-weight: 700;
    color: #2c3e50;
    display: block;
    margin-bottom: 5px;
}

.stat-label {
    color: #666;
    font-size: 1.1rem;
}

.error-item {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    border-left: 4px solid #e74c3c;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.1);
}

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

.error-type {
    font-weight: 600;
    color: #c0392b;
    font-size: 1.3rem;
}

.error-position {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 1rem;
    box-shadow: 0 2px 6px rgba(231, 76, 60, 0.25);
}

.error-text {
    font-size: 1.6rem;
    margin-bottom: 12px;
    padding: 15px;
    background: #fff5f5;
    border-radius: 8px;
    font-family: 'Jomolhari', sans-serif;
    border: 1px solid #fadbd8;
    line-height: 2;
}

.incorrect {
    background: #ffebee;
    padding: 4px 8px;
    border-radius: 4px;
    color: #c0392b;
    font-weight: 600;
    text-decoration: underline wavy #e74c3c;
}

.correction {
    font-size: 1.2rem;
    color: #16a085;
    margin-top: 10px;
    padding: 12px;
    background: #f0fdf4;
    border-radius: 6px;
    border: 1px solid #d1f2eb;
    line-height: 1.8;
}

.correction strong {
    color: #0e8c6f;
}

.success-message {
    background: linear-gradient(135deg, #f0fdf4 0%, #e8f8f5 100%);
    padding: 30px;
    text-align: center;
    border-radius: 10px;
    border: 2px solid #16a085;
    box-shadow: 0 4px 15px rgba(22, 160, 133, 0.15);
}

.success-icon {
    font-size: 3.5rem;
    margin-bottom: 15px;
    color: #16a085;
}

.success-message h3 {
    color: #16a085;
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.success-message p {
    font-size: 1.2rem;
    line-height: 1.8;
}

.corrected-text-section {
    background: linear-gradient(135deg, #e8f8f5 0%, #d1f2eb 100%);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 2px solid #16a085;
    box-shadow: 0 4px 15px rgba(22, 160, 133, 0.15);
}

.corrected-text-section h3 {
    color: #0e8c6f;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.corrected-text-display {
    background: white;
    padding: 20px;
    border-radius: 8px;
    font-size: 1.5rem;
    font-family: 'Jomolhari', sans-serif;
    line-height: 2;
    margin-bottom: 15px;
    border: 1px solid #a8dcd1;
}

.apply-btn {
    background: linear-gradient(135deg, #16a085 0%, #0e8c6f 100%);
    color: white;
    padding: 12px 30px;
    font-size: 1.2rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: 'Jomolhari', -apple-system, sans-serif;
    box-shadow: 0 4px 12px rgba(22, 160, 133, 0.25);
}

.apply-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(22, 160, 133, 0.35);
    background: linear-gradient(135deg, #0e8c6f 0%, #0c7a5e 100%);
}

.info-section {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 2px solid #e0e0e0;
}

.info-description {
    color: #5d6d7e;
    font-size: 1.4rem;
    text-align: center;
    line-height: 2;
    margin: 0;
}


footer {
    background: linear-gradient(135deg, #ecf0f1 0%, #dfe6e9 100%);
    padding: 25px;
    text-align: center;
    color: #7f8c8d;
    font-size: 1.1rem;
    border-top: 1px solid #bdc3c7;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    main {
        padding: 20px;
    }
}

/* Loading animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

