/* Prevenir scroll horizontal */
body {
    overflow-x: hidden;
}

/* Reset Box Sizing */
.tool-container *,
.tool-container *::before,
.tool-container *::after {
    box-sizing: border-box;
}

/* Layout da Ferramenta */
.tool-container {
    max-width: 1400px;
    margin: 60px auto;
    padding: 0 20px;
    display: flex;
    gap: 32px;
    min-height: 600px;
    width: 100%;
    box-sizing: border-box;
}

/* Coluna Esquerda - Input */
.tool-input-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #f3f4f6;
    box-sizing: border-box;
    min-width: 0;
}

/* Coluna Direita - Output */
.tool-output-section {
    flex: 0 0 420px;
    background: linear-gradient(135deg, #0629a3 0%, #083fcf 100%);
    border-radius: 20px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    color: white;
    box-shadow: 0 8px 32px rgba(6, 41, 163, 0.25);
    position: relative;
    overflow: visible;
    box-sizing: border-box;
    max-height: calc(100vh - 120px);
    min-width: 0;
}

.tool-output-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

/* Breadcrumb customizado */
.tool-breadcrumb {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: -8px;
    font-family: var(--font-family-body);
    padding: 8px 0;
}
.tool-breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}
.tool-breadcrumb a:hover {
    color: var(--tertiary-color);
}
.tool-breadcrumb span {
    margin: 0 6px;
    color: #d1d5db;
    font-size: 13px;
}
.tool-breadcrumb span:not(.current) {
    font-size: 13px;
}
.tool-breadcrumb .current {
    color: var(--text-color);
    font-weight: 600;
}
.tool-breadcrumb .category {
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 600;
}

/* Cabeçalho da Ferramenta */
.tool-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f3f4f6;
}
.tool-title {
    font-family: var(--font-family-headings);
    font-size: 22px;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.tool-title img {
    width: 24px;
    height: 24px;
    filter: drop-shadow(0 2px 4px rgba(6, 41, 163, 0.15));
}

/* ===============================
   OUTRAS FERRAMENTAS SECTION
   =============================== */

.other-tools-section {
    padding: 60px 0;
    background-color: #f9fafb;
}

.other-tools-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.other-tools-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}

.other-tools-header .category-icon-img {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.other-tools-header .category-title {
    font-family: var(--font-family-headings);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
}

/* Reuso dos estilos de tools-grid e tool-card da página principal */
.other-tools-section .tools-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* Tool Card Styles (compartilhado com ferramentas.css) */
.tool-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    border: 1px solid #f3f4f6;
}

.tool-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    border-color: transparent;
}

.tool-card-illustration {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.tool-card-illustration::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    pointer-events: none;
}

.tool-card:hover .tool-card-illustration {
    transform: scale(1.05);
}

.illustration-content {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.tool-card:hover .illustration-content {
    transform: translateY(-4px);
}

.tool-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.tool-card-category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-color);
    background: rgba(6, 41, 163, 0.1);
    padding: 4px 12px;
    border-radius: 12px;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    width: fit-content;
}

.tool-card-title {
    font-family: var(--font-family-headings);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 12px;
    line-height: 1.3;
}

.tool-card-description {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.tool-card-cta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.tool-card:hover .tool-card-cta {
    gap: 12px;
    color: var(--tertiary-color);
}

.tool-card:hover .tool-card-cta svg {
    transform: translateX(4px);
}

.tool-card-cta svg {
    transition: transform 0.3s ease;
}
.tool-subtitle {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
}

/* Ícone do título (SVG placeholder class) */
.tool-icon {
    color: var(--primary-color);
}

/* Área de Input */
.input-group {
    margin-bottom: 16px;
}
.input-label {
    font-family: var(--font-family-headings);
    font-weight: 600;
    color: var(--text-color);
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
    letter-spacing: -0.2px;
}
.input-helper {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 12px;
    display: block;
}

.tool-textarea {
    width: 100%;
    height: 120px;
    padding: 14px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-family: var(--font-family-body);
    font-size: 14px;
    resize: vertical;
    margin-bottom: 0;
    transition: all 0.3s ease;
    background-color: #f9fafb;
    line-height: 1.6;
}
.tool-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(6, 41, 163, 0.08);
    transform: translateY(-1px);
}
.tool-textarea::placeholder {
    color: #9ca3af;
}

/* Botões Principais */
.tool-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
    gap: 12px;
}

/* Botão Recomeçar (Estilo Outline) */
.btn-tool-secondary {
    background: white;
    border: 2px solid #e5e7eb;
    color: #6b7280;
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-family-headings);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}
.btn-tool-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: #f9fafb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Botão Ação Principal (Estilo Sólido) */
.btn-tool-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #083fcf 100%);
    color: white;
    padding: 14px 32px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-family-headings);
    font-weight: 700;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(6, 41, 163, 0.25);
}
.btn-tool-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(6, 41, 163, 0.35);
}
.btn-tool-primary:active {
    transform: translateY(0);
}

/* Área de Output */
.output-title {
    font-family: var(--font-family-headings);
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
    opacity: 0.95;
    letter-spacing: -0.2px;
    position: relative;
    z-index: 1;
}

.output-box {
    background-color: #ffffff;
    border: none;
    border-radius: 16px;
    flex: 0 0 auto;
    margin-bottom: 20px;
    height: 450px;
    position: relative;
    resize: none;
    overflow-y: auto;
    overflow-x: hidden;
    color: var(--text-color);
    padding: 20px;
    font-size: 15px;
    line-height: 1.8;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    z-index: 1;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Estilização da scrollbar */
.output-box::-webkit-scrollbar {
    width: 6px;
}

.output-box::-webkit-scrollbar-track {
    background: transparent;
    margin: 4px;
}

.output-box::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 10px;
}

.output-box::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.output-box:empty::before {
    content: 'O resultado aparecerá aqui...';
    color: #9ca3af;
    font-style: italic;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.output-box p {
    margin-bottom: 16px;
}

.output-box p:last-child {
    margin-bottom: 0;
}

.output-box h1, .output-box h2, .output-box h3 {
    margin-top: 24px;
    margin-bottom: 12px;
    font-weight: 700;
}

.output-box h1:first-child,
.output-box h2:first-child,
.output-box h3:first-child {
    margin-top: 0;
}

.output-box ul, .output-box ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.output-box li {
    margin-bottom: 8px;
}

.output-box strong, .output-box b {
    font-weight: 700;
    color: var(--primary-color);
}

.output-box em, .output-box i {
    font-style: italic;
    color: #4b5563;
}

.output-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.btn-output {
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-family-headings);
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}
.btn-output:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Responsividade - Outras Ferramentas */
@media (max-width: 768px) {
    .other-tools-section {
        padding: 40px 0;
    }

    .other-tools-header {
        gap: 12px;
    }

    .other-tools-header .category-icon-img {
        width: 28px;
        height: 28px;
    }

    .other-tools-header .category-title {
        font-size: 1.25rem;
    }

    .other-tools-section .tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .tool-card-illustration {
        height: 160px;
    }

    .tool-card-content {
        padding: 20px;
    }

    .tool-card-title {
        font-size: 1.15rem;
    }
}

@media (max-width: 480px) {
    .other-tools-header .category-title {
        font-size: 1.1rem;
    }

    .other-tools-section .tools-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .tool-card-illustration {
        height: 140px;
    }

    .illustration-content svg {
        width: 100px;
        height: 100px;
    }

    .tool-card-title {
        font-size: 1.1rem;
    }

    .tool-card-description {
        font-size: 0.9rem;
    }
}

/* ===============================
   QR CODE SPECIFIC STYLES
   =============================== */

/* Tabs */
.qrcode-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.qrcode-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 8px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-family: var(--font-family-headings);
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-direction: column;
}

.qrcode-tab:hover {
    background: #f3f4f6;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.qrcode-tab.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.qrcode-tab svg {
    flex-shrink: 0;
}

/* Character Counter */
.char-counter {
    display: block;
    font-size: 12px;
    color: #6b7280;
    text-align: right;
    margin-top: 6px;
    font-weight: 500;
}

/* Customization Options */
.qrcode-options {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.option-label {
    font-family: var(--font-family-headings);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color);
}

.option-select {
    padding: 8px 10px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-family: var(--font-family-body);
    font-size: 13px;
    background: #f9fafb;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.option-select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
}

.option-color {
    width: 70px;
    height: 38px;
    padding: 4px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option-color:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* QR Code Preview */
.qrcode-preview {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-height: 320px;
}

.qrcode-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
}

.qrcode-placeholder svg {
    opacity: 0.4;
    width: 64px;
    height: 64px;
}

.qrcode-placeholder p {
    font-size: 15px;
    font-style: italic;
    margin: 0;
}

.qrcode-image {
    max-width: 280px;
    max-height: 280px;
    width: auto;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    background: white;
    padding: 12px;
}

/* ===============================
   RESPONSIVE STYLES
   =============================== */

/* Responsividade - Tool Container */
@media (max-width: 900px) {
    .tool-container {
        flex-direction: column;
        gap: 24px;
        margin: 40px auto;
        max-width: 100%;
    }
    
    .tool-input-section {
        flex: 1;
        padding: 24px;
        width: 100%;
        max-width: 100%;
    }
    
    .tool-output-section {
        max-height: none;
        padding: 24px;
        width: 100%;
        max-width: 100%;
        flex: 1;
    }
    
    .output-box {
        height: 350px;
    }
    
    .tool-actions {
        flex-direction: column;
        gap: 12px;
        margin-top: 24px;
    }
    
    .btn-tool-secondary,
    .btn-tool-primary {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
    }
    
    .output-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .btn-output {
        width: 100%;
        justify-content: center;
    }
    
    /* QR Code Responsive */
    .qrcode-tabs {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .qrcode-tab {
        font-size: 11px;
        padding: 10px 8px;
        flex-direction: row;
        gap: 6px;
    }
    
    .qrcode-tab svg {
        width: 16px;
        height: 16px;
    }
    
    .qrcode-options {
        flex-direction: column;
        gap: 12px;
    }
    
    .option-group {
        width: 100%;
    }
    
    .option-select {
        width: 100%;
    }
    
    .option-color {
        width: 100%;
        height: 44px;
    }
    
    .qrcode-preview {
        padding: 24px;
        min-height: 280px;
    }
    
    .qrcode-image {
        max-width: 220px;
        max-height: 220px;
    }
    
    .qrcode-placeholder svg {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 480px) {
    .tool-container {
        margin: 16px auto;
        padding: 0 12px;
        gap: 20px;
        max-width: 100%;
    }
    
    .tool-input-section,
    .tool-output-section {
        padding: 16px;
        border-radius: 16px;
        width: 100%;
        max-width: 100%;
    }
    
    .tool-breadcrumb {
        font-size: 11px;
        padding: 6px 0;
        margin-bottom: -6px;
    }
    
    .tool-breadcrumb span {
        margin: 0 4px;
    }
    
    .tool-header {
        margin-bottom: 16px;
        padding-bottom: 14px;
    }
    
    .tool-title {
        font-size: 20px;
        gap: 8px;
    }
    
    .tool-title img {
        width: 22px;
        height: 22px;
    }
    
    .tool-subtitle {
        font-size: 13px;
    }
    
    .input-group {
        margin-bottom: 12px;
    }
    
    .input-label {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .input-helper {
        font-size: 11px;
        margin-bottom: 8px;
    }
    
    .tool-textarea {
        height: 100px;
        font-size: 14px;
        padding: 12px;
        border-radius: 10px;
    }
    
    .tool-actions {
        margin-top: 16px;
        gap: 10px;
    }
    
    .btn-tool-secondary,
    .btn-tool-primary {
        font-size: 13px;
        padding: 12px 18px;
        border-radius: 10px;
    }
    
    .btn-tool-secondary svg,
    .btn-tool-primary svg {
        width: 16px;
        height: 16px;
    }
    
    .output-title {
        font-size: 15px;
        margin-bottom: 16px;
    }
    
    .output-box {
        height: 300px;
        padding: 16px;
        font-size: 14px;
    }
    
    .btn-output {
        font-size: 12px;
        padding: 10px 14px;
    }
    
    .btn-output svg {
        width: 14px;
        height: 14px;
    }
    
    /* QR Code Mobile */
    .qrcode-tabs {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
    
    .qrcode-tab {
        font-size: 10px;
        padding: 8px 6px;
        flex-direction: column;
        gap: 4px;
    }
    
    .qrcode-tab svg {
        width: 14px;
        height: 14px;
    }
    
    .qrcode-options {
        flex-direction: column;
        gap: 10px;
    }
    
    .option-label {
        font-size: 12px;
        margin-bottom: 4px;
    }
    
    .option-select {
        width: 100%;
        font-size: 13px;
        padding: 10px;
    }
    
    .option-color {
        width: 100%;
        height: 42px;
    }
    
    .char-counter {
        font-size: 11px;
    }
    
    .qrcode-preview {
        padding: 20px;
        min-height: 260px;
    }
    
    .qrcode-image {
        max-width: 200px;
        max-height: 200px;
        padding: 10px;
    }
    
    .qrcode-placeholder {
        padding: 30px 20px;
    }
    
    .qrcode-placeholder svg {
        width: 50px;
        height: 50px;
    }
    
    .qrcode-placeholder p {
        font-size: 13px;
    }
    
    .output-actions {
        gap: 10px;
    }
    
    .btn-output {
        font-size: 12px;
        padding: 10px 14px;
    }
}