/* Text Formatter Tool Styles - Premium Navy-Gold Theme */
:root {
    --navy: #1A2A44;
    --navy-light: #2A3A54;
    --navy-dark: #0A1A34;
    --gold: #D4AF37;
    --gold-light: #E4BF47;
    --gold-dark: #C49F27;
    --text-light: #F0F0F0;
    --text-dark: #333333;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --premium-gradient: linear-gradient(135deg, var(--navy) 0%, #2A3A64 100%);
    --gold-gradient: linear-gradient(135deg, var(--gold) 0%, #E4BF47 100%);
}

/* Tool Header Styles */
.tool-header {
    background: var(--premium-gradient);
    color: var(--text-light);
    padding: 2rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 28px 28px 0 0;
    margin: 1.5rem auto 0 auto;
    max-width: 900px;
}
.tool-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('../../assets/images/pattern-dark.png');
    opacity: 0.1;
    z-index: 0;
}
.tool-header .container { position: relative; z-index: 1; }
.premium-badge {
    background: var(--gold-gradient);
    color: var(--navy-dark);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.8rem;
    display: inline-block;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
}
.premium-badge i { margin-right: 0.3rem; }
.tool-title h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: var(--gold);
    letter-spacing: -1px;
    display: flex;
    align-items: center;
    gap: 0.7rem;
}
.tool-title .title-underline {
    width: 48px;
    height: 4px;
    background: #D4AF37;
    border-radius: 2px;
    margin-bottom: 1rem;
    margin-left: auto;
    margin-right: auto;
}
.tool-description {
    font-size: 1.1rem;
    color: #fff;
    opacity: 0.92;
    margin-bottom: 0.5rem;
}

/* Formatter Main Container */
.formatter-container {
    background: #fff;
    box-shadow: 0 4px 24px rgba(26,42,68,0.10);
    border-radius: 24px;
    padding: 2.5rem 2rem 2rem 2rem;
    margin: 2rem auto 2rem auto;
    max-width: 1000px;
    min-width: 320px;
    position: relative;
}

.input-section, .output-section {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(26,42,68,0.05);
    padding: 1.5rem 1rem 1.5rem 1rem;
    margin-bottom: 2rem;
}
.input-section h2, .output-section h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 1rem;
    text-align: left;
}

.input-actions, .output-actions {
    display: flex;
    gap: 0.7rem;
    margin-bottom: 1rem;
}
.action-btn, .primary-btn {
    background: var(--navy);
    color: #fff;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    padding: 0.5em 1.3em;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.action-btn:hover, .primary-btn:hover {
    background: var(--gold);
    color: var(--navy-dark);
}

textarea#inputCode {
    width: 100%;
    min-height: 130px;
    border-radius: 10px;
    border: 1px solid #e0e4ea;
    padding: 1em;
    font-family: inherit;
    font-size: 1.06rem;
    background: #fcfcfd;
    color: var(--navy-dark);
    margin-bottom: 0.5rem;
    resize: vertical;
}

#outputCode {
    background: #fcfcfd;
    border-radius: 10px;
    min-height: 50px;
    padding: 1em;
    font-family: 'Fira Mono', 'Consolas', monospace;
    color: var(--navy-dark);
    margin-bottom: 1em;
    border: 1px solid #e0e4ea;
}

.features-section {
    margin: 3rem auto 2.5rem auto;
    max-width: 1160px;
    text-align: center;
}
.features-section h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}
.features-section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--gold);
    border-radius: 2px;
    margin: 0.5rem auto 0 auto;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}
.feature-item {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(26,42,68,0.07);
    padding: 2rem 1.2rem 1.7rem 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: box-shadow 0.18s;
}
.feature-item:hover {
    box-shadow: 0 6px 18px rgba(212,175,55,0.12);
}
.feature-item i {
    font-size: 2.1rem;
    color: var(--gold);
    margin-bottom: 0.8rem;
}
.feature-item h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.5rem;
}
.feature-item p {
    color: #555;
    font-size: 1rem;
    margin: 0;
}

.how-to-section, .faq-section {
    max-width: 900px;
    margin: 3rem auto 2.5rem auto;
    text-align: center;
}
.how-to-section h2, .faq-section h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 0.5rem;
    display: inline-block;
    position: relative;
}
.how-to-section h2::after, .faq-section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--gold);
    border-radius: 2px;
    margin: 0.5rem auto 0 auto;
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
    align-items: center;
}
.step {
    display: flex;
    align-items: flex-start;
    gap: 1.3rem;
    max-width: 600px;
    margin: 0 auto;
}
.step-number {
    background: var(--gold);
    color: var(--navy-dark);
    font-weight: 700;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-top: 0.2rem;
}
.step-content h3 {
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.2rem;
}
.step-content p {
    color: #555;
    margin: 0;
    font-size: 1rem;
}

.faq-items {
    margin-top: 2.5rem;
    text-align: left;
}
.faq-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(26,42,68,0.07);
    margin-bottom: 1.2rem;
    padding: 1.2rem 1.5rem;
    cursor: pointer;
    transition: box-shadow 0.18s;
}
.faq-item:hover {
    box-shadow: 0 6px 18px rgba(212,175,55,0.12);
}
.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.faq-question h3 {
    color: var(--navy);
    font-size: 1.08rem;
    font-weight: 700;
    margin: 0;
}
.faq-question i {
    color: var(--gold);
    font-size: 1.1rem;
}
.faq-answer {
    color: #555;
    font-size: 1rem;
    margin-top: 0.7rem;
    display: none;
}
.faq-item.active .faq-answer {
    display: block;
}

@media (max-width: 900px) {
    .formatter-container, .tool-header, .features-section, .how-to-section, .faq-section {
        max-width: 99vw;
        padding: 1.2rem 0.7rem;
    }
    .features-grid {
        gap: 1rem;
    }
}

@media (max-width: 600px) {
    .formatter-container, .tool-header, .features-section, .how-to-section, .faq-section {
        border-radius: 14px;
        padding: 0.7rem 0.2rem;
        width: 100vw;
        max-width: 100vw;
        min-width: unset;
        box-sizing: border-box;
        margin-left: 0;
        margin-right: 0;
    }
    .formatter-container {
        margin: 0;
    }
    .tool-title h1, .features-section h2, .how-to-section h2, .faq-section h2 {
        font-size: 1.15rem;
    }
    .premium-badge {
        font-size: 0.85rem;
        padding: 0.2rem 0.6rem;
    }
    .features-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    .feature-item {
        padding: 1rem 0.5rem 0.8rem 0.5rem;
        font-size: 0.97rem;
    }
    .input-section, .output-section {
        padding: 1rem 0.3rem 1rem 0.3rem;
        width: 100%;
        box-sizing: border-box;
    }
    .input-section h2, .output-section h2 {
        font-size: 1.02rem;
    }
    .formatter-controls, .input-actions, .output-actions {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }
    .control-group, .input-actions, .output-actions {
        width: 100%;
    }
    .control-input, select, input[type="file"] {
        width: 100%;
        box-sizing: border-box;
        font-size: 0.98rem;
    }
    .action-btn, .primary-btn {
        font-size: 0.95rem;
        padding: 0.45em 1em;
        width: 100%;
        box-sizing: border-box;
    }
    textarea#inputCode, #outputCode {
        font-size: 0.98rem;
        padding: 0.7em;
        width: 100%;
        box-sizing: border-box;
    }
    .steps {
        gap: 1.1rem;
    }
    .step {
        flex-direction: column;
        gap: 0.3rem;
        align-items: flex-start;
        max-width: 100%;
    }
    .step-number {
        width: 30px;
        height: 30px;
        font-size: 1rem;
        margin-bottom: 0.2rem;
    }
    .faq-item {
        padding: 1rem 0.5rem;
    }
}


/* Controls Section */
.formatter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 1.5rem;
    align-items: flex-end;
}
.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.control-group label {
    font-weight: 500;
    color: #1A2A44;
}
.control-input {
    padding: 0.5em 1em;
    border-radius: 10px;
    border: 1px solid #D4AF37;
    background: #fff;
    color: #1A2A44;
    font-size: 1rem;
    outline: none;
    transition: border 0.2s;
}
.control-input:focus {
    border-color: #1A2A44;
}

.CodeMirror {
    border-radius: 18px;
    background: #23241f;
    font-size: 1.08rem;
    min-height: 180px;
    box-shadow: 0 2px 12px rgba(26,42,68,0.08);
    margin-bottom: 1rem;
}

button, .btn {
    background: var(--gold-gradient);
    color: var(--navy-dark);
    font-weight: 600;
    border: none;
    border-radius: 12px;
    padding: 0.6em 1.4em;
    font-size: 1rem;
    cursor: pointer;
    margin-right: 0.7em;
    margin-bottom: 0.7em;
    box-shadow: 0 2px 8px rgba(212,175,55,0.10);
    transition: background 0.2s, color 0.2s;
}
button:hover, .btn:hover {
    background: var(--navy);
    color: #fff;
}

#formattedCode {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1em;
    min-height: 50px;
    font-family: 'Fira Mono', 'Consolas', monospace;
    color: #1A2A44;
    margin-bottom: 1em;
    box-shadow: 0 2px 8px rgba(26,42,68,0.05);
}

@media (max-width: 900px) {
    .formatter-container, .tool-header {
        max-width: 99vw;
        padding: 1.2rem 0.7rem;
    }
    .formatter-controls {
        gap: 1rem;
    }
}
@media (max-width: 600px) {
    .formatter-container, .tool-header {
        border-radius: 18px;
        padding: 0.7rem 0.2rem;
    }
    .tool-title h1 {
        font-size: 1.3rem;
    }
    .premium-badge {
        font-size: 0.9rem;
    }
}


.formatter-container {
    background: rgba(255,255,255,0.92);
    box-shadow: 0 4px 32px rgba(26,42,68,0.08), 0 1.5px 8px rgba(212,175,55,0.10);
    border-radius: 32px;
    padding: 2.5rem 2rem 2rem 2rem;
    margin: 2rem auto;
    max-width: 900px;
    min-width: 320px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: relative;
}

.tool-header {
    background: linear-gradient(135deg, #1A2A44 0%, #D4AF37 100%);
    border-radius: 28px 28px 0 0;
    padding: 2rem 2rem 1rem 2rem;
    margin: 1.5rem auto 0 auto;
    max-width: 900px;
    color: #fff;
    box-shadow: 0 4px 24px rgba(26,42,68,0.10);
    position: relative;
}

.premium-badge {
    display: inline-block;
    background: #D4AF37;
    color: #1A2A44;
    font-weight: 600;
    border-radius: 18px;
    padding: 0.3em 1em;
    font-size: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(212,175,55,0.10);
}

.tool-title {
    text-align: left;
}
.tool-title h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: #D4AF37;
    letter-spacing: -1px;
    display: flex;
    align-items: center;
    gap: 0.7rem;
}
.tool-title .title-underline {
    width: 48px;
    height: 4px;
    background: #D4AF37;
    border-radius: 2px;
    margin-bottom: 1rem;
}
.tool-description {
    font-size: 1.1rem;
    color: #fff;
    opacity: 0.92;
    margin-bottom: 0.5rem;
}

.formatter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 1.5rem;
    align-items: flex-end;
}
.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.control-group label {
    font-weight: 500;
    color: #1A2A44;
}
.control-input {
    padding: 0.5em 1em;
    border-radius: 10px;
    border: 1px solid #D4AF37;
    background: #fff;
    color: #1A2A44;
    font-size: 1rem;
    outline: none;
    transition: border 0.2s;
}
.control-input:focus {
    border-color: #1A2A44;
}

.CodeMirror {
    border-radius: 18px;
    background: #23241f;
    font-size: 1.08rem;
    min-height: 180px;
    box-shadow: 0 2px 12px rgba(26,42,68,0.08);
    margin-bottom: 1rem;
}

button, .btn {
    background: #D4AF37;
    color: #1A2A44;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    padding: 0.6em 1.4em;
    font-size: 1rem;
    cursor: pointer;
    margin-right: 0.7em;
    margin-bottom: 0.7em;
    box-shadow: 0 2px 8px rgba(212,175,55,0.10);
    transition: background 0.2s, color 0.2s;
}
button:hover, .btn:hover {
    background: #1A2A44;
    color: #fff;
}

#formattedCode {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1em;
    min-height: 50px;
    font-family: 'Fira Mono', 'Consolas', monospace;
    color: #1A2A44;
    margin-bottom: 1em;
    box-shadow: 0 2px 8px rgba(26,42,68,0.05);
}

@media (max-width: 900px) {
    .formatter-container, .tool-header {
        max-width: 99vw;
        padding: 1.2rem 0.7rem;
    }
    .formatter-controls {
        gap: 1rem;
    }
}

@media (max-width: 600px) {
    .formatter-container, .tool-header {
        border-radius: 18px;
        padding: 0.7rem 0.2rem;
    }
    .tool-title h1 {
        font-size: 1.3rem;
    }
    .premium-badge {
        font-size: 0.9rem;
    }
}
