/* HTML Formatter Custom Styles & Syntax Highlighting */

.apple-glass {
    background: rgba(18, 18, 20, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.apple-card {
    background: rgba(29, 29, 31, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.apple-card:hover {
    border-color: rgba(245, 158, 11, 0.25);
    box-shadow: 0 10px 30px -10px rgba(245, 158, 11, 0.2);
}

.text-glow-amber {
    text-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
}

/* Custom Inputs & Textareas */
.custom-input {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #f4f4f5;
    transition: all 0.2s ease-in-out;
}

.custom-input:focus {
    border-color: #f59e0b;
    outline: none;
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.25);
}

/* Mode Buttons */
.mode-btn-active {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff !important;
    border-color: rgba(245, 158, 11, 0.5) !important;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
}

.mode-btn-inactive {
    background: rgba(255, 255, 255, 0.04);
    color: #a1a1aa;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.mode-btn-inactive:hover {
    color: #ffffff;
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.3);
}

.result-card-glow {
    background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.12), transparent 70%);
}

.code-textarea {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    white-space: pre;
    tab-size: 4;
}

/* HTML Syntax Highlighting */
.html-tag-bracket {
    color: #71717a;
    font-weight: bold;
}

.html-tag-name {
    color: #f59e0b;
    font-weight: 600;
}

.html-attr-name {
    color: #38bdf8;
}

.html-attr-value {
    color: #34d399;
}

.html-comment {
    color: #71717a;
    font-style: italic;
}

.html-doctype {
    color: #c084fc;
    font-weight: bold;
}

.html-entity {
    color: #fb7185;
}

.html-text {
    color: #e4e4e7;
}

/* Formatted Code View & Line Numbers */
.formatted-code-line {
    display: flex;
    line-height: 1.6;
}

.line-num-span {
    width: 2.75rem;
    color: rgba(255, 255, 255, 0.25);
    text-align: right;
    padding-right: 0.75rem;
    user-select: none;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.error-line-highlight {
    background-color: rgba(239, 68, 68, 0.15) !important;
    border-left: 3px solid #ef4444 !important;
}

/* Interactive HTML Tree Styling */
.tree-expanded-indicator {
    transition: transform 0.15s ease;
    display: inline-block;
}

.tree-collapsed .tree-expanded-indicator {
    transform: rotate(-90deg);
}

.tree-node-content {
    padding-left: 0.75rem !important;
    border-left: 1px dashed rgba(255, 255, 255, 0.1);
    margin-left: 0.25rem !important;
}

.tree-node-content.hidden-node {
    display: none;
}

.highlight-match {
    background-color: rgba(245, 158, 11, 0.35);
    border-radius: 2px;
    padding: 0 2px;
}

/* Tag Badge in DOM Tree */
.dom-tag-badge {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: #fbbf24;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.dom-class-badge {
    color: #38bdf8;
}

.dom-id-badge {
    color: #c084fc;
}

/* Live Preview Frame */
#live-preview-frame {
    transition: background-color 0.25s ease;
}
