/* HTML Preview Specific Styles */

.tool-container {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

.tool-header {
    text-align: center;
    margin-bottom: 30px;
}

.tool-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tool-header p {
    color: #6b7280;
    font-size: 1.1rem;
}

/* Editor Card */
.editor-card {
    background: white;
    border-radius: 30px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.dark-mode .editor-card {
    background: #1f2937;
    border-color: #374151;
}

/* Editor Header */
.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    flex-wrap: wrap;
    gap: 15px;
}

.dark-mode .editor-header {
    background: #111827;
    border-bottom-color: #374151;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.header-left h3 {
    font-size: 1.1rem;
    color: #111827;
    margin: 0;
}

.dark-mode .header-left h3 {
    color: #f9fafb;
}

.badge {
    padding: 4px 12px;
    background: #e5e7eb;
    border-radius: 60px;
    font-size: 0.85rem;
    color: #6b7280;
}

.dark-mode .badge {
    background: #374151;
    color: #9ca3af;
}

.header-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 40px;
    height: 40px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 60px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.dark-mode .action-btn {
    background: #1f2937;
    border-color: #374151;
    color: #9ca3af;
}

.action-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    transform: translateY(-2px);
}

/* Editor Content */
.editor-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 20px;
    min-height: 500px;
    transition: all 0.3s ease;
}

/* Editor Only Mode */
.editor-content.editor-only {
    grid-template-columns: 1fr !important;
}

.editor-content.editor-only .preview-section {
    display: none;
}

.editor-content.editor-only .input-section {
    display: block;
    width: 100%;
}

/* Preview Only Mode */
.editor-content.preview-only {
    grid-template-columns: 1fr !important;
}

.editor-content.preview-only .input-section {
    display: none;
}

.editor-content.preview-only .preview-section {
    display: block;
    width: 100%;
}

/* Input Section */
.input-section {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.html-input {
    width: 100%;
    height: 500px;
    padding: 20px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 20px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #111827;
    resize: vertical;
    outline: none;
    transition: all 0.2s ease;
}

.dark-mode .html-input {
    background: #111827;
    border-color: #374151;
    color: #f9fafb;
}

.html-input:focus {
    border-color: #3b82f6;
}

.html-input.word-wrap {
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Preview Section */
.preview-section {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 0 5px;
}

.preview-header span {
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 600;
}

.refresh-btn {
    width: 36px;
    height: 36px;
    background: transparent;
    border: 2px solid #e5e7eb;
    border-radius: 60px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dark-mode .refresh-btn {
    border-color: #374151;
    color: #9ca3af;
}

.refresh-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    transform: rotate(180deg);
}

.preview-frame {
    flex: 1;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 20px;
    overflow: hidden;
    height: 500px;
    width: 100%;
}

.preview-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
}

.dark-mode .preview-iframe {
    background: white;
}

/* Options Bar */
.options-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    flex-wrap: wrap;
    gap: 15px;
}

.dark-mode .options-bar {
    background: #111827;
    border-top-color: #374151;
}

.option-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-size: 0.9rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #3b82f6;
}

.view-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.view-btn {
    padding: 8px 16px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 60px;
    color: #6b7280;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dark-mode .view-btn {
    background: #1f2937;
    border-color: #374151;
    color: #9ca3af;
}

.view-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.view-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.view-btn i {
    font-size: 0.9rem;
}

/* Info Section */
.info-section {
    background: #f9fafb;
    border-radius: 30px;
    padding: 30px;
    margin: 30px 0;
    border: 1px solid #e5e7eb;
}

.dark-mode .info-section {
    background: #111827;
    border-color: #374151;
}

.info-section h3 {
    font-size: 1.3rem;
    margin: 20px 0 15px;
    color: #111827;
}

.dark-mode .info-section h3 {
    color: #f9fafb;
}

.info-section h3:first-child {
    margin-top: 0;
}

.info-section p {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 15px;
}

.dark-mode .info-section p {
    color: #9ca3af;
}

.info-section ul {
    list-style: none;
    padding: 0;
}

.info-section ul li {
    padding: 8px 0;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dark-mode .info-section ul li {
    color: #9ca3af;
}

.tip-box {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background: #f0f9ff;
    border-radius: 20px;
    margin-top: 20px;
    border: 1px solid #bae6fd;
}

.dark-mode .tip-box {
    background: #1e3a5f;
    border-color: #2563eb;
}

.tip-box i {
    font-size: 1.5rem;
    color: #f59e0b;
    margin-top: 2px;
}

.tip-box div {
    color: #0369a1;
    font-size: 0.95rem;
    line-height: 1.5;
}

.dark-mode .tip-box div {
    color: #bae6fd;
}

.tip-box strong {
    color: #111827;
}

.dark-mode .tip-box strong {
    color: #f9fafb;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .html-input,
    .preview-frame {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .tool-header h1 {
        font-size: 2rem;
    }
    
    .editor-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .editor-content.editor-only,
    .editor-content.preview-only {
        grid-template-columns: 1fr;
    }
    
    .html-input,
    .preview-frame {
        height: 350px;
    }
    
    .editor-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-actions {
        width: 100%;
        justify-content: center;
    }
    
    .options-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .view-options {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .view-options {
        flex-wrap: wrap;
    }
    
    .view-btn {
        flex: 1;
        min-width: 100px;
        justify-content: center;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}