/* =====================================================
   Tool Pages - Dedicated Styles
   ===================================================== */

/* Breadcrumb */
.breadcrumb-container {
    max-width: 1400px;
    margin: 90px auto 0;
    padding: 1rem 2rem;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb .current {
    color: var(--primary-color);
}

/* Tool Page Layout */
.tool-page-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem 2rem;
}

.tool-page-container {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 1024px) {
    .tool-page-container {
        grid-template-columns: 1fr;
    }
}

/* Tool Main Section */
.tool-main {
    padding: 2rem;
}

.tool-header {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--glass-border);
}

.tool-icon-large {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--dark-bg);
    flex-shrink: 0;
}

.tool-title-section h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tool-tagline {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.tool-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.tool-stats span {
    background: var(--glass-bg);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
}

.tool-stats span i {
    color: var(--accent-color);
    margin-right: 5px;
}

/* Tool Interface */
.tool-interface {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-section,
.output-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tool-interface label {
    font-weight: 500;
    color: var(--text-primary);
}

.tool-interface textarea,
.tool-interface input[type="text"],
.tool-interface select {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    background: rgba(0, 20, 40, 0.5);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 1rem;
    resize: vertical;
    outline: none;
    transition: var(--transition);
}

.tool-interface textarea:focus,
.tool-interface input:focus,
.tool-interface select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

.tool-interface textarea::placeholder {
    color: var(--text-muted);
}

.language-select {
    cursor: pointer;
}

.language-select option {
    background: var(--dark-bg);
    color: var(--text-primary);
    padding: 10px;
}

.char-counter {
    text-align: right;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Swap Button */
.swap-btn-container {
    display: flex;
    justify-content: center;
}

.swap-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--primary-color);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}

.swap-btn:hover {
    background: var(--gradient-1);
    color: var(--dark-bg);
    border-color: transparent;
    transform: rotate(180deg);
}

/* Result Box */
.result-box {
    min-height: 150px;
    padding: 1rem;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    background: rgba(0, 20, 40, 0.5);
    color: var(--text-primary);
    line-height: 1.8;
    white-space: pre-wrap;
    word-break: break-word;
}

.result-box .placeholder-text {
    color: var(--text-muted);
    font-style: italic;
}

.result-box pre {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
}

.result-box code {
    font-family: 'Courier New', monospace;
}

/* Result Actions */
.result-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.action-btn {
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    background: var(--glass-bg);
    color: var(--text-secondary);
    font-family: var(--font-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.action-btn:hover:not(:disabled) {
    background: var(--primary-color);
    color: var(--dark-bg);
    border-color: var(--primary-color);
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Process Button */
.process-btn {
    width: 100%;
    padding: 1.2rem;
    border: none;
    border-radius: 12px;
    background: var(--gradient-1);
    color: var(--dark-bg);
    font-family: var(--font-primary);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.process-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
}

.process-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.process-btn.loading {
    pointer-events: none;
}

.process-btn.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Sidebar */
.tool-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.ad-sidebar {
    margin: 0;
    padding: 0;
}

.ad-sidebar .ad-placeholder {
    min-height: 250px;
}

.other-tools {
    padding: 1.5rem;
}

.other-tools h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.tools-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tools-list li {
    margin-bottom: 0.5rem;
}

.tools-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.tools-list a:hover {
    background: var(--glass-bg);
    color: var(--primary-color);
}

.tools-list a i {
    width: 20px;
    color: var(--primary-color);
}

/* Tool Description */
.tool-description {
    padding: 2rem;
    margin-bottom: 2rem;
}

.tool-description h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tool-description h3 {
    font-size: 1.3rem;
    margin: 2rem 0 1rem;
    color: var(--primary-color);
}

.tool-description p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.feature-item {
    padding: 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    text-align: center;
}

.feature-item i {
    font-size: 2rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.feature-item h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.feature-item p {
    font-size: 0.9rem;
    margin: 0;
}

/* Languages List */
.languages-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.languages-list span {
    padding: 0.5rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* How To List */
.how-to-list {
    padding-left: 1.5rem;
    margin-top: 1rem;
}

.how-to-list li {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.how-to-list strong {
    color: var(--text-primary);
}

/* Use Cases List */
.use-cases-list {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
}

.use-cases-list li {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.use-cases-list i {
    color: var(--accent-color);
    margin-right: 10px;
}

/* Tool FAQ */
.tool-faq {
    padding: 2rem;
    margin-bottom: 2rem;
}

.tool-faq h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tool-faq .faq-item {
    margin-bottom: 0.75rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    overflow: hidden;
}

.tool-faq .faq-item summary {
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-primary);
    list-style: none;
}

.tool-faq .faq-item summary::-webkit-details-marker {
    display: none;
}

.tool-faq .faq-item p {
    padding: 0 1.5rem 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

/* Code Display */
.code-language-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.code-lang-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    background: var(--glass-bg);
    color: var(--text-secondary);
    font-family: var(--font-primary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.code-lang-btn:hover,
.code-lang-btn.active {
    background: var(--primary-color);
    color: var(--dark-bg);
    border-color: var(--primary-color);
}

/* Options Grid */
.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.option-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.option-item label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
    .tool-header {
        flex-direction: column;
        text-align: center;
    }

    .tool-icon-large {
        margin: 0 auto;
    }

    .tool-title-section h1 {
        font-size: 1.6rem;
    }

    .tool-stats {
        justify-content: center;
    }

    .breadcrumb-container {
        margin-top: 80px;
    }

    .tool-main {
        padding: 1.5rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
}
