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

.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: 640px;
    margin-bottom: 1rem;
    margin-top: 0;
}

.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;
}

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

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

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

.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%;
    min-height: 400px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: var(--surface-muted);
    color: var(--text-main);
    
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

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

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

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

.action-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    width: 100%;
    margin-top: 24px;
}

.btn-action-modern {
    border: none;
    border-radius: 14px;
    padding: 14px 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: inset 0 0 0 1px var(--border);
    background: var(--surface-muted);
    color: var(--text-main);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    cursor: pointer;
    font-size: 15px;
}

.btn-action-modern:hover {
    transform: translateY(-2px);
    background: rgba(13, 71, 251, 0.08);
    box-shadow: 0 4px 12px rgba(13, 71, 251, 0.15);
}

.output-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--surface-muted);
    color: var(--text-main);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
    font-size: 0.95rem;
}

.copy-btn:hover {
    background: rgba(13, 71, 251, 0.08);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.copy-btn[data-state="copied"] {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.4);
    color: #059669;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.stat-card {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface-muted);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

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

.conversion-options {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.options-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 12px 0;
    transition: color 0.2s ease;
}

.options-header:hover {
    color: var(--primary);
}

.options-header i {
    transition: transform 0.3s ease;
}

.options-header.active i {
    transform: rotate(180deg);
}

.options-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.options-content.active {
    max-height: 1000px;
    padding-top: 24px;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.option-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

.form-select {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text-main);
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13, 71, 251, 0.15);
}

.options-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

.checkbox-group label {
    font-size: 14px;
    color: var(--text-main);
    cursor: pointer;
    user-select: none;
}

@media (max-width: 767px) {
    .tool-hero {
        flex-direction: column;
    }

    .hero-text h1 {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
    }

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

    .panel {
        padding: 24px;
    }

    .tool-columns {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .column-divider {
        display: none;
    }

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

    .column-right {
        padding-top: 24px;
        border-top: 1px solid var(--border);
    }

    .code-editor {
        min-height: 300px;
        font-size: 13px;
    }

    .action-buttons {
        grid-template-columns: 1fr;
    }

    .output-actions {
        flex-direction: column;
        width: 100%;
    }

    .copy-btn {
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .options-grid {
        grid-template-columns: 1fr;
    }

    .options-checkboxes {
        grid-template-columns: 1fr;
    }
}

