:root {
    /* Primary Colors */
    --sql-primary: #2563eb;
    --sql-primary-dark: #1d4ed8;
    --sql-primary-light: #3b82f6;
    --sql-accent: #0ea5e9;
    --sql-surface: #ffffff;
    --sql-surface-muted: #f8fafc;
    --sql-border: #e2e8f0;
    --sql-border-light: #f1f5f9;
    --sql-text: #0f172a;
    --sql-text-muted: #64748b;
    --sql-text-light: #94a3b8;
    --sql-success: #22c55e;
    --sql-success-light: #4ade80;
    --sql-warning: #f59e0b;
    --sql-error: #ef4444;
    --sql-info: #06b6d4;
    
    /* Shadow System */
    --sql-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --sql-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --sql-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --sql-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Border Radius */
    --sql-radius-sm: 0.5rem;
    --sql-radius-md: 0.75rem;
    --sql-radius-lg: 1rem;
    --sql-radius-xl: 1.5rem;
    
    /* For tool-hero compatibility */
    --text-muted: var(--sql-text-muted);
}

/* Tool Hero Section */
.tool-hero {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.hero-text {
    flex: 1;
    min-width: 260px;
}

.hero-text h1 {
    font-size: 40px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 840px;
    margin-bottom: 24px;
    margin-top: 0;
}

@media (max-width: 767px) {
    .hero-text h1 {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
    }
    
    .hero-subtitle {
        font-size: clamp(1rem, 3vw, 1.125rem);
    }
}

/* Main YAML Section */
.sql-yaml-section {
    margin-bottom: 3rem;
}

.sql-yaml-card {
    background: var(--sql-surface);
    border: 1px solid var(--sql-border);
    border-radius: var(--sql-radius-xl);
    box-shadow: var(--sql-shadow-lg);
    padding: 1.5rem;
    transition: box-shadow 0.3s ease;
}

.sql-yaml-card:hover {
    box-shadow: var(--sql-shadow-xl);
}

/* YAML Container */
.yaml-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 992px) {
    .yaml-container {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

/* Panel Styles */
.yaml-input-panel,
.yaml-output-panel {
    display: flex;
    flex-direction: column;
    background: var(--sql-surface-muted);
    border: 1px solid var(--sql-border);
    border-radius: var(--sql-radius-lg);
    overflow: hidden;
    min-height: 400px;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--sql-surface);
    border-bottom: 1px solid var(--sql-border);
    flex-wrap: wrap;
    gap: 0.75rem;
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--sql-text);
    margin: 0;
}

.panel-icon {
    font-size: 1.25rem;
}

.panel-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* YAML Controls */
.yaml-controls {
    padding: 1rem 1.25rem;
    background: var(--sql-surface);
    border-bottom: 1px solid var(--sql-border);
}

/* Action Buttons Row */
.action-buttons-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

/* Action Buttons */
.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--sql-border);
    border-radius: var(--sql-radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--sql-surface);
    color: var(--sql-text-muted);
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--sql-shadow-md);
}

.action-btn:active {
    transform: translateY(0);
}

.action-btn-primary {
    color: var(--sql-primary);
    border-color: var(--sql-primary);
    background: rgba(37, 99, 235, 0.05);
}

.action-btn-primary:hover {
    background: rgba(37, 99, 235, 0.1);
    border-color: var(--sql-primary-dark);
}

.action-btn-success {
    color: var(--sql-success);
    border-color: var(--sql-success);
    background: rgba(34, 197, 94, 0.05);
}

.action-btn-success:hover {
    background: rgba(34, 197, 94, 0.1);
    border-color: var(--sql-success-light);
}

.action-btn-secondary {
    color: var(--sql-text-muted);
    border-color: var(--sql-border);
}

.action-btn-secondary:hover {
    color: var(--sql-text);
    border-color: var(--sql-primary);
    background: rgba(37, 99, 235, 0.05);
}

.btn-icon {
    font-size: 1rem;
}

.btn-text {
    display: inline;
}

@media (max-width: 575px) {
    .btn-text {
        display: none;
    }
    
    .action-btn {
        padding: 0.5rem;
        min-width: 40px;
    }
    
    .action-buttons-row {
        grid-template-columns: 1fr;
    }
}

/* Editor Wrapper */
.editor-wrapper {
    flex: 1;
    position: relative;
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

.editor-wrapper .editor {
    width: 100% !important;
    height: 100% !important;
    min-height: 400px;
}

@media (min-width: 768px) {
    .editor-wrapper {
        min-height: 500px;
    }
    
    .editor-wrapper .editor {
        min-height: 500px;
    }
}

/* Conversion Stats */
.conversion-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: rgba(37, 99, 235, 0.03);
    border-bottom: 1px solid var(--sql-border);
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--sql-surface);
    border: 1px solid var(--sql-border);
    border-radius: var(--sql-radius-sm);
    transition: all 0.2s ease;
}

.stat-card:hover {
    border-color: var(--sql-primary);
    box-shadow: var(--sql-shadow-sm);
}

.stat-card-highlight {
    background: rgba(37, 99, 235, 0.05);
    border-color: var(--sql-primary);
}

.stat-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    min-width: 0;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--sql-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--sql-primary);
    line-height: 1.2;
    word-break: break-word;
}

.stat-card-highlight .stat-value {
    color: var(--sql-primary-dark);
}

@media (max-width: 767px) {
    .conversion-stats {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 0.875rem 1rem;
    }
    
    .stat-card {
        padding: 0.625rem;
    }
    
    .stat-value {
        font-size: 1rem;
    }
}

/* Content Section */
.content-section {
    padding: 2rem 0;
}

.content-block {
    background: var(--sql-surface);
    border: 1px solid var(--sql-border);
    border-radius: var(--sql-radius-lg);
    padding: 2rem;
    box-shadow: var(--sql-shadow-sm);
}

.content-block h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--sql-text);
    margin-bottom: 1rem;
    margin-top: 0;
}

.content-block h3 {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--sql-text);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.content-block p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--sql-text-muted);
    margin-bottom: 1.5rem;
}

.content-block ul,
.content-block ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.content-block li {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--sql-text-muted);
    margin-bottom: 0.5rem;
}

.content-block code {
    background: var(--sql-surface-muted);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
    color: var(--sql-primary);
    
}

/* Mobile Optimizations */
@media (max-width: 767px) {
    .sql-yaml-card {
        padding: 1rem;
    }
    
    .panel-header {
        padding: 0.875rem 1rem;
    }
    
    .panel-title {
        font-size: 1rem;
    }
    
    .yaml-controls {
        padding: 1rem;
    }
    
    .editor-wrapper {
        min-height: 300px;
    }
    
    .editor-wrapper .editor {
        min-height: 300px;
    }
    
    .content-block {
        padding: 1.5rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible styles */
.action-btn:focus-visible,
.editor-wrapper:focus-within {
    outline: 2px solid var(--sql-primary);
    outline-offset: 2px;
}

/* Copy Feedback */
.copy-feedback {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: var(--sql-success);
    color: #ffffff;
    border-radius: var(--sql-radius-md);
    box-shadow: var(--sql-shadow-lg);
    font-weight: 500;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
    pointer-events: none;
}

.copy-feedback.show {
    opacity: 1;
    transform: translateY(0);
}

.copy-feedback.error {
    background: var(--sql-error);
}

@media (max-width: 767px) {
    .copy-feedback {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        text-align: center;
    }
}

/* Loading State */
.action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.action-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

