:root {
    --surface: #ffffff;
    --surface-muted: #f4f6fb;
    --border: #e3e8f2;
    --text-main: #1c2333;
    --text-muted: #5f6b85;
    --primary: #0d47fb;
    --primary-dark: #0a2fa3;
    --accent: #8b5cf6;
    --success: #22c55e;
    --warning: #f59e0b;
    --shadow-soft: 0 20px 45px rgba(15, 23, 42, 0.08);
    --shadow-hover: 0 8px 24px rgba(13, 71, 251, 0.15);
    --gradient: linear-gradient(135deg, #0d47fb 0%, #8b5cf6 100%);
}

/* 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;
    color: var(--text-main);
}

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

/* Panel and Card Styles */
.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    padding: 32px;
    height: 100%;
    transition: background 0.3s ease, border 0.3s ease;
}

.tool-card {
    margin-bottom: 40px;
}

.tool-columns {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 24px;
    align-items: start;
}

.column-left,
.column-right {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

.column-right {
    flex: 1;
}

.column-header {
    margin-bottom: 24px;
}

.column-header h2 {
    color: var(--text-main);
    font-weight: 600;
}

.column-header p {
    color: var(--text-muted);
    font-size: 14px;
}

.column-divider {
    width: 1px;
    background: var(--border);
    align-self: stretch;
    margin: 0;
}

.tool-wrapper {
    margin-bottom: 40px;
}

/* Editor Styles */
.editor-wrapper {
    position: relative;
    margin-top: 20px;
}

.editor-wrapper label {
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
    color: var(--text-muted);
    font-size: 14px;
}

.code-editor {
    width: 100%;
    padding: 16px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-main);
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 12px;
    resize: vertical;
    transition: all 0.2s ease;
    min-height: 300px;
}

.code-editor:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13, 71, 251, 0.1);
    background: var(--surface);
}

.code-editor:read-only {
    background: var(--surface-muted);
    cursor: default;
}

.code-editor::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.btn-action-modern {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-action-modern:hover {
    background: var(--surface-muted);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

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

.btn-action-modern i {
    font-size: 13px;
}

.btn-primary-action {
    background: var(--gradient);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(13, 71, 251, 0.3);
}

.btn-primary-action:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(13, 71, 251, 0.4);
}

/* Stats Container */
.stats-container {
    display: flex;
    gap: 16px;
    margin-top: 16px;
    padding: 12px 16px;
    background: var(--surface-muted);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

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

.stat-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
}

.stat-value i {
    font-size: 14px;
    margin-right: 4px;
}

/* Output Actions */
.output-actions {
    display: flex;
    gap: 8px;
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 71, 251, 0.2);
}

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

.copy-btn i {
    font-size: 12px;
}

.copy-btn.copied {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

/* Mobile Responsive */
@media (max-width: 991px) {
    .tool-columns {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .column-divider {
        display: none;
    }

    .column-left,
    .column-right {
        margin-bottom: 24px;
    }

    .column-right {
        margin-bottom: 0;
    }

    .panel {
        padding: 24px;
    }
}

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

    .hero-subtitle {
        font-size: clamp(1rem, 3vw, 1.125rem);
    }

    .panel {
        padding: 20px;
        border-radius: 16px;
    }

    .code-editor {
        font-size: 13px;
        padding: 12px;
        min-height: 250px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn-action-modern {
        width: 100%;
        justify-content: center;
    }

    .output-actions {
        flex-wrap: wrap;
    }

    .copy-btn {
        flex: 1;
        min-width: 80px;
        justify-content: center;
    }

    .stats-container {
        flex-direction: column;
        gap: 12px;
    }

    .stat-item {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

@media (max-width: 575px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .tool-hero {
        gap: 20px;
        margin-bottom: 1.5rem;
    }

    .code-editor {
        font-size: 12px;
        padding: 10px;
        min-height: 200px;
    }

    .stats-container {
        padding: 10px 12px;
    }

    .stat-label {
        font-size: 11px;
    }

    .stat-value {
        font-size: 14px;
    }
}

