/* Font Preview Specific Styles */

/* Screen Reader Only Text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.upload-area {
    width: 100%;
}

.upload-section {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.upload-icon {
    font-size: 56px;
    color: #22c55e;
    margin-bottom: 12px;
    filter: drop-shadow(0 0 12px rgba(34, 197, 94, 0.4));
    transition: all 0.3s ease;
}

.upload-area:hover .upload-icon {
    transform: scale(1.1);
    filter: drop-shadow(0 0 20px rgba(34, 197, 94, 0.6));
}

.upload-content h3 {
    color: #ffffff;
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(135deg, #2adb5c 0%, #22c55e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.upload-content p {
    color: #9ca3af;
    margin: 0;
    font-size: 17px;
    line-height: 1.5;
    font-weight: 400;
}

.supported-formats {
    font-size: 14px !important;
    color: #6b7280 !important;
    font-style: italic;
}

.font-info {
    flex: 1;
    min-width: 280px;
    background: #000000;
    border: 1px solid #333333;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(42, 219, 92, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.font-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.03), transparent);
    transition: left 0.5s ease;
}

.font-info h4 {
    color: #ffffff;
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(135deg, #2adb5c 0%, #22c55e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

.info-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #333333;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    color: #9ca3af;
    font-size: 14px;
    font-weight: 500;
}

.info-value {
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
}

.preview-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin: 32px 0;
    background: #000000;
    border: 1px solid #333333;
    padding: 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(42, 219, 92, 0.1);
    position: relative;
    overflow: hidden;
}

.preview-options::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(42, 219, 92, 0.05), transparent);
    transition: left 0.8s ease;
}

.preview-options:hover::before {
    left: 100%;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    z-index: 1;
    border: 0;
    outline: none;
}

.option-group label {
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(135deg, #ffffff 0%, #e4e4e7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.option-group input[type="range"] {
    width: 100%;
    height: 8px;
    background: linear-gradient(to right, #27272a 0%, #3f3f46 100%);
    outline: none;
    -webkit-appearance: none;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.option-group input[type="range"]:hover {
    background: linear-gradient(to right, #3f3f46 0%, #52525b 100%);
}

.option-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2adb5c 0%, #22c55e 100%);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(42, 219, 92, 0.4), 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.option-group input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(42, 219, 92, 0.6), 0 2px 8px rgba(0, 0, 0, 0.4);
}

.option-group input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2adb5c 0%, #22c55e 100%);
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 12px rgba(42, 219, 92, 0.4);
    transition: all 0.3s ease;
}

.option-group select,
.option-group input[type="color"] {
    padding: 12px 16px;
    border: 1px solid #333333;
    background: #000000;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.option-group select:hover,
.option-group input[type="color"]:hover {
    border-color: #2adb5c;
    box-shadow: 0 4px 16px rgba(42, 219, 92, 0.2);
}

.option-group select:focus,
.option-group input[type="color"]:focus {
    outline: none;
    border-color: #2adb5c;
    box-shadow: 0 0 0 3px rgba(42, 219, 92, 0.1);
}

.option-group input[type="color"] {
    width: 60px;
    height: 48px;
    padding: 4px;
    cursor: pointer;
}

#fontSizeValue {
    color: #2adb5c;
    font-weight: 600;
    font-size: 14px;
}

/* Features Highlight Section */
.features-highlight {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.feature-item_font {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: linear-gradient(135deg, #2adb5c 0%, #22c55e 100%);
    color: white;
    border-radius: 0;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(42, 219, 92, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: default;
    z-index: 1;
    ;
}

.feature-item_font::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.4s ease;
}

section h3 {
    color: initial;
    margin: initial;
    padding: initial;
    border: initial;
}


.feature-item_font i {
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.3));
}

.preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 32px;
    margin-top: 40px;
}

.preview-panel {
    background: #000000;
    border: 1px solid #333333;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(42, 219, 92, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    flex: 1;
}

.preview-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.02), transparent);
    transition: left 0.6s ease;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    padding: 0;
}

.panel-header::after {
    content: none
}

.panel-title {
    font-size: 20px;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(135deg, #ffffff 0%, #e4e4e7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.panel-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.panel-controls select {
    padding: 6px 10px;
    border: 1px solid #333333;
    background: #000000;
    color: #ffffff;
    font-size: 14px;
}

.preview-textarea {
    width: 100%;
    height: 140px;
    padding: 20px;
    border: 1px solid #333333;
    background: #000000;
    color: #ffffff;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    resize: vertical;
    outline: none;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
    resize: none;
}

.preview-textarea:focus {
    border-color: #2adb5c;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5), 0 0 0 3px rgba(42, 219, 92, 0.3);
    background: #000000;
}

.preview-textarea::placeholder {
    color: #9ca3af;
    font-style: italic;
}

.font-preview-area {
    min-height: 220px;
    padding: 24px;
    border: 1px solid #333333;
    overflow-wrap: break-word;
    word-wrap: break-word;
    white-space: pre-wrap;
    line-height: 1.6;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.font-preview-area:not([style*="background-color"]) {
    background: #000000;
}

.font-preview-area:hover {
    border-color: #2adb5c;
}

.character-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 12px;
    padding: 24px;
    border: 1px solid #333333;
    background: #000000;
    max-height: 450px;
    overflow-y: auto;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
}


.character-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    border: 1px solid #333333;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.character-item:not([style*="background-color"]) {
    background: #000000;
}

.character-item:hover:not([style*="background-color"]) {
    background: #1a1a1a;
}

.character-item:hover {
    transform: translateY(-2px) scale(1.05);
    border-color: #2adb5c;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 12px rgba(42, 219, 92, 0.2);
}

.character-display {
    font-size: 28px;
    margin-bottom: 6px;
    color: #ffffff;
    font-weight: 500;
}

.character-code {
    font-size: 10px;
    color: #9ca3af;
    font-family: 'Courier New', monospace;
    font-weight: 500;
    background: #1a1a1a;
    padding: 2px 4px;
}

.size-comparison {
    margin-top: 40px;
    background: #000000;
    border: 1px solid #333333;
    padding: 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(42, 219, 92, 0.1);
    position: relative;
    overflow: hidden;
}

.size-comparison::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(42, 219, 92, 0.05), transparent);
    transition: left 0.8s ease;
}

.size-comparison:hover::before {
    left: 100%;
}

.size-comparison h3 {
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    margin: 0 0 24px 0;
    background: linear-gradient(135deg, #2adb5c 0%, #22c55e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

.size-samples {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.size-sample {
    background: #000000;
    color: #ffffff;
    transition: all 0.3s ease;
}

.error-message {
    background: #1a0000;
    border: 1px solid #dc2626;
    color: #fca5a5;
    padding: 12px 16px;
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.success-message {
    background: #001a00;
    border: 1px solid #16a34a;
    color: #86efac;
    padding: 12px 16px;
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #2adb5c 0%, #22c55e 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    transform: translateY(-2px);
}

.btn-secondary {
    background: #1a1a1a;
    color: #9ca3af;
    border: 1px solid #333333;
}

.btn-secondary:hover {
    background: #333333;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .upload-section {
        flex-direction: column;
        gap: 24px;
    }

    .preview-container {
        grid-template-columns: 1fr;
        gap: 24px;
        margin-top: 32px;
    }

    .preview-options {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 24px;
        margin: 24px 0;
    }

    .character-grid {
        grid-template-columns: repeat(auto-fill, minmax(55px, 1fr));
        gap: 10px;
        padding: 20px;
        max-height: 350px;
    }

    .panel-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .about-section h2 {
        font-size: 28px;
    }

    .about-section h3 {
        font-size: 20px;
        margin: 24px 0 12px 0;
    }

    .size-comparison {
        margin-top: 32px;
        padding: 24px;
    }

    .size-comparison h3 {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .upload-area {
        padding: 32px 20px;
    }

    .upload-content h3 {
        font-size: 22px;
    }

    .upload-icon {
        font-size: 48px;
    }
}

/* Custom Font Face */
@font-face {
    font-family: 'CustomUploadedFont';
    src: url('') format('truetype');
}

.custom-font {
    font-family: 'CustomUploadedFont', sans-serif;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #e2e8f0;
    border-radius: 50%;
    border-top-color: #2adb5c;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Drag and Drop States */
.upload-area.drag-enter {
    border-color: #2adb5c;
    background: rgba(42, 219, 92, 0.1);
}

.upload-area.drag-over {
    border-color: #22c55e;
    background: rgba(42, 219, 92, 0.2);
    transform: scale(1.02);
}

/* About Section Styles */
.about-section {
    position: relative;
    overflow: hidden;
}

.about-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(42, 219, 92, 0.03), transparent);
    transition: left 1s ease;
}

.about-section:hover::before {
    left: 100%;
}

.about-section h2 {
    color: #ffffff;
    font-size: 32px;
    font-weight: 800;
    font-family: 'Montserrat', sans-serif;
    margin: 0 0 24px 0;
    background: linear-gradient(135deg, #2adb5c 0%, #22c55e 50%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

.about-section h3 {
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    margin: 32px 0 16px 0;
    background: linear-gradient(135deg, #ffffff 0%, #e4e4e7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

.about-section p {
    color: #9ca3af;
    line-height: 1.7;
    margin: 0 0 20px 0;
    font-weight: 400;
    position: relative;
    z-index: 1;
}

.about-section ul,
.about-section ol {
    color: #9ca3af;
    line-height: 1.7;
    margin: 0 0 24px 0;
    padding-left: 24px;
    position: relative;
    z-index: 1;
}

.about-section li {
    margin-bottom: 12px;
    position: relative;
}

.about-section li strong {
    color: #2adb5c;
    font-weight: 600;
}

.about-section ul li::marker {
    color: #2adb5c;
}

.about-section ol li::marker {
    color: #2adb5c;
    font-weight: 600;
}

/* Font Preview Animation */
.font-preview-area {
    transition: all 0.3s ease;
}

.character-item {
    transition: all 0.2s ease;
}

.size-sample {
    transition: all 0.3s ease;
}