/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
    direction: rtl;
}

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

/* Header Styles - Enhanced */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 35px;
    width: auto;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    padding: 20px;
    min-width: 600px;
    max-height: 70vh;
    overflow-y: auto;
    z-index: 9999;
}

.nav.show {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
}

.nav-section h3 {
    color: #495057;
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-section ul {
    list-style: none;
}

.nav-section li {
    margin-bottom: 0.3rem;
}

.nav-section a {
    text-decoration: none;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.nav-section a:hover,
.nav-section a.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    transform: translateX(-2px);
}

.nav-section i {
    font-size: 0.8rem;
    width: 16px;
}

.lang-btn, .menu-btn {
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(255,255,255,0.3);
    color: #495057;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    backdrop-filter: blur(10px);
}

.lang-btn:hover, .menu-btn:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.menu-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Main Content */
.main {
    padding: 2rem 0;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    margin: 1rem;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    color: #6c757d;
}

.breadcrumb a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: #764ba2;
}

.breadcrumb i {
    font-size: 0.7rem;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: 16px;
    margin: 0 1rem 2rem;
}

.hero h1 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.8rem;
    font-weight: 700;
}

.hero-description {
    font-size: 1.1rem;
    color: #6c757d;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Beautifier Section */
.beautifier-section {
    margin: 0 1rem 2rem;
}

.beautifier-card {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 600px;
}

.input-section {
    padding: 2rem;
    border-left: 1px solid rgba(102, 126, 234, 0.1);
}

.input-header {
    margin-bottom: 2rem;
    text-align: center;
}

.input-header h2 {
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.input-header p {
    color: #6c757d;
    font-size: 0.9rem;
}

.input-area {
    margin-bottom: 2rem;
}

.textarea-wrapper {
    position: relative;
}

#jsInput {
    width: 100%;
    padding: 1rem;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    font-size: 0.85rem;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    resize: vertical;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.9);
    line-height: 1.5;
    min-height: 250px;
}

#jsInput:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    background: white;
}

.input-stats {
    position: absolute;
    bottom: 10px;
    right: 15px;
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: #6c757d;
    background: rgba(255,255,255,0.9);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    backdrop-filter: blur(5px);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.stat-item i {
    font-size: 0.7rem;
}

/* Options Section */
.options-section {
    margin-bottom: 2rem;
}

.options-section h3 {
    color: #495057;
    margin-bottom: 1rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.options-grid {
    display: grid;
    gap: 0.8rem;
}

.option-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    cursor: pointer;
    padding: 0.8rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.option-item:hover {
    background: rgba(102, 126, 234, 0.05);
    border-color: #667eea;
}

.option-item input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.option-item input[type="checkbox"]:checked + .checkmark {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #667eea;
}

.option-item input[type="checkbox"]:checked + .checkmark:after {
    content: '✓';
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
}

.option-text {
    flex: 1;
}

.option-text strong {
    display: block;
    color: #495057;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

.option-text small {
    color: #6c757d;
    font-size: 0.8rem;
    line-height: 1.4;
}

/* Indent Settings */
.indent-settings {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.indent-settings h3 {
    color: #495057;
    margin-bottom: 1rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.indent-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: end;
}

.indent-type label {
    display: block;
    color: #495057;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.radio-group {
    display: flex;
    gap: 1rem;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.85rem;
}

.radio-item input[type="radio"] {
    display: none;
}

.radio-mark {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.radio-item input[type="radio"]:checked + .radio-mark {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.radio-item input[type="radio"]:checked + .radio-mark:after {
    content: '';
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
}

.indent-size-setting label {
    display: block;
    color: #495057;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

#indentSize {
    width: 100%;
    padding: 0.5rem;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 8px;
    font-size: 0.85rem;
    background: white;
    transition: all 0.3s ease;
}

#indentSize:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.action-buttons {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-beautify, .btn-sample, .btn-clear {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 130px;
    justify-content: center;
}

.btn-beautify {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-beautify:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-sample {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-sample:hover {
    background: linear-gradient(135deg, #218838, #1ea080);
    transform: translateY(-2px);
}

.btn-clear {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.btn-clear:hover {
    background: linear-gradient(135deg, #495057, #343a40);
    transform: translateY(-2px);
}

/* Output Section */
.output-section {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.05), rgba(32, 201, 151, 0.05));
    padding: 2rem;
}

.output-header {
    margin-bottom: 2rem;
    text-align: center;
}

.output-header h2 {
    color: #495057;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.output-header p {
    color: #6c757d;
    font-size: 0.9rem;
}

.output-area {
    margin-bottom: 2rem;
}

#jsOutput {
    width: 100%;
    padding: 1rem;
    border: 2px solid rgba(40, 167, 69, 0.2);
    border-radius: 12px;
    font-size: 0.85rem;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    resize: vertical;
    background: rgba(255,255,255,0.9);
    line-height: 1.5;
    color: #495057;
    min-height: 250px;
}

.output-stats {
    position: absolute;
    bottom: 10px;
    right: 15px;
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    background: rgba(40, 167, 69, 0.1);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    backdrop-filter: blur(5px);
}

.output-stats .stat-item {
    color: #28a745;
}

.output-actions {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.btn-copy, .btn-download, .btn-compare {
    padding: 0.8rem 1.2rem;
    border: none;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-copy {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-copy:hover {
    background: linear-gradient(135deg, #218838, #1ea080);
    transform: translateY(-2px);
}

.btn-download {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
}

.btn-download:hover {
    background: linear-gradient(135deg, #138496, #117a8b);
    transform: translateY(-2px);
}

.btn-compare {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #212529;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.btn-compare:hover {
    background: linear-gradient(135deg, #e0a800, #d39e00);
    transform: translateY(-2px);
}

/* Beautification Stats */
.beautification-stats {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(40, 167, 69, 0.2);
}

.beautification-stats h3 {
    color: #495057;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
    justify-content: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.stat-card {
    background: white;
    padding: 1.2rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(40, 167, 69, 0.1);
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #28a745;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    font-size: 1.2rem;
}

.stat-icon.success {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.stat-icon.warning {
    background: linear-gradient(135deg, #fd7e14, #e76500);
}

.stat-icon.info {
    background: linear-gradient(135deg, #17a2b8, #138496);
}

.stat-info {
    text-align: center;
}

.stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #495057;
    margin-bottom: 0.3rem;
}

.stat-label {
    color: #6c757d;
    font-size: 0.85rem;
}

/* Comparison Modal */
.comparison-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 1000px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
}

.modal-header h2 {
    color: #495057;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6c757d;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.comparison-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-height: 60vh;
    overflow: hidden;
}

.comparison-side {
    padding: 1.5rem;
    border-left: 1px solid rgba(102, 126, 234, 0.2);
}

.comparison-side:first-child {
    border-left: none;
}

.comparison-side h3 {
    color: #495057;
    margin-bottom: 1rem;
    font-size: 1rem;
    text-align: center;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
}

.comparison-side pre {
    background: rgba(248, 249, 250, 0.8);
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    line-height: 1.4;
    overflow: auto;
    max-height: 45vh;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    color: #495057;
}

/* Upload Section */
.upload-section {
    margin: 0 1rem 2rem;
}

.upload-card {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    text-align: center;
}

.upload-card h2 {
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.upload-card p {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.upload-area {
    border: 2px dashed rgba(102, 126, 234, 0.3);
    border-radius: 12px;
    padding: 3rem 2rem;
    transition: all 0.3s ease;
    background: rgba(102, 126, 234, 0.05);
    cursor: pointer;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.02);
}

.upload-content i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.upload-content h3 {
    color: #495057;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.upload-content p {
    color: #6c757d;
    margin-bottom: 1.5rem !important;
    font-size: 0.9rem;
}

.btn-browse {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-browse:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
    transform: translateY(-2px);
}

.upload-info {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6c757d;
    font-size: 0.85rem;
}

.info-item i {
    color: #667eea;
}

/* Best Practices */
.best-practices {
    margin: 0 1rem 2rem;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.3);
}

.best-practices h2 {
    text-align: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.practices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.practice-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid rgba(102, 126, 234, 0.1);
    transition: all 0.3s ease;
}

.practice-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.practice-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
}

.practice-card h3 {
    color: #495057;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.practice-card p {
    color: #6c757d;
    line-height: 1.6;
    font-size: 0.9rem;
}

/* Info Section */
.info-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 0 1rem 2rem;
}

.info-section .info-card,
.about-card {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.3);
}

.info-section .info-card h2,
.about-card h2 {
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.info-section .info-card p,
.about-card p {
    color: #6c757d;
    line-height: 1.8;
    font-size: 0.95rem;
}

/* Benefits Section */
.benefits-section {
    margin: 0 1rem 2rem;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.3);
}

.benefits-section h2 {
    text-align: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
    font-size: 1.5rem;
    font-weight: 600;
}

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

.benefit-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid rgba(102, 126, 234, 0.1);
    transition: all 0.3s ease;
}

.benefit-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.benefit-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
}

.benefit-card h3 {
    color: #495057;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.benefit-card p {
    color: #6c757d;
    line-height: 1.6;
    font-size: 0.9rem;
}

/* Usage Guide */
.usage-guide {
    margin: 0 1rem 2rem;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.3);
}

.usage-guide h2 {
    text-align: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.guide-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.step-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(102, 126, 234, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.step-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.step-number {
    position: absolute;
    top: -15px;
    right: 20px;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.step-content h3 {
    color: #495057;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.step-content p {
    color: #6c757d;
    line-height: 1.6;
    font-size: 0.9rem;
}

/* Popular Tools */
.popular-tools {
    margin: 0 1rem 2rem;
}

.popular-tools h2 {
    text-align: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    font-weight: 700;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.tool-card {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    color: #6c757d;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.3);
}

.tool-card:hover,
.tool-card.active {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    color: #667eea;
    border-color: rgba(102, 126, 234, 0.3);
}

.tool-card i {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tool-card span {
    display: block;
    font-weight: 500;
    font-size: 0.95rem;
}

/* Footer */
.footer {
    background: rgba(248, 249, 250, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(102, 126, 234, 0.2);
    padding: 2rem 0 1rem;
    margin: 2rem 1rem 0;
    border-radius: 16px 16px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1rem;
    font-weight: 600;
}

.footer-logo {
    height: 35px;
    margin-bottom: 1rem;
}

.footer-section p {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 10px;
    text-align: center;
    line-height: 40px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.social-links a:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul a {
    color: #6c757d;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.footer-section ul a:hover {
    color: #667eea;
    padding-right: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(102, 126, 234, 0.2);
    color: #6c757d;
    font-size: 0.85rem;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.copy-success {
    animation: copySuccess 0.3s ease;
}

@keyframes copySuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .main {
        margin: 0.5rem;
        border-radius: 16px;
        padding: 1rem 0;
    }

    .hero {
        margin: 0 0.5rem 1.5rem;
        padding: 1.5rem 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .beautifier-card {
        grid-template-columns: 1fr;
    }

    .output-section {
        order: -1;
    }

    .options-grid {
        grid-template-columns: 1fr;
    }

    .indent-options {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .action-buttons,
    .output-actions {
        flex-direction: column;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .practices-grid {
        grid-template-columns: 1fr;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
    }

    .guide-steps {
        grid-template-columns: 1fr;
    }

    .info-section {
        grid-template-columns: 1fr;
    }

    .comparison-content {
        grid-template-columns: 1fr;
        max-height: none;
    }

    .comparison-side {
        border-left: none;
        border-bottom: 1px solid rgba(102, 126, 234, 0.2);
    }

    .comparison-side:last-child {
        border-bottom: none;
    }

    .upload-info {
        flex-direction: column;
        gap: 1rem;
    }

    .tools-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .beautifier-card,
    .upload-card,
    .best-practices,
    .benefits-section,
    .usage-guide {
        padding: 1.2rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    #jsInput,
    #jsOutput {
        min-height: 200px;
    }

    .upload-area {
        padding: 2rem 1rem;
    }

    .upload-content i {
        font-size: 2rem;
    }

    .modal-content {
        width: 95%;
        margin: 1rem;
    }

    .modal-header {
        padding: 1rem 1.5rem;
    }

    .comparison-side {
        padding: 1rem;
    }
}

/* Additional utility classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-muted { color: #6c757d; }
.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(40, 167, 69, 0.3);
    border-top: 3px solid #28a745;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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