: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%);
}

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

.ace-editor-container {
    width: 100%;
    min-height: 400px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: var(--surface-muted);
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

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

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


.result-actions {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.share-container {
    background: rgba(13, 71, 251, 0.08);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    border: 1px solid rgba(13, 71, 251, 0.2);
}

.share-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-main);
}

.share-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.share-btn {
    border: none;
    border-radius: 14px;
    padding: 12px 16px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.15);
    font-size: 14px;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 24px rgba(15, 23, 42, 0.18);
}

.share-btn i {
    font-size: 14px;
}

.share-x {
    background: #111827;
}

.share-facebook {
    background: #1877f2;
}

.share-linkedin {
    background: #0a66c2;
}

.share-reddit {
    background: #ff4500;
}

.share-telegram {
    background: #229ed9;
}

.share-whatsapp {
    background: #25d366;
    color: #0f172a;
}

.education-block {
    margin-top: 50px;
}

.education-block h2 {
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-main);
}

.education-block h3 {
    font-size: 24px;
    font-weight: 700;
    margin-top: 32px;
    margin-bottom: 16px;
    color: var(--text-main);
}

.education-block p {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 16px;
}

.education-block ul {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 16px;
    padding-left: 24px;
}

.education-block li {
    margin-bottom: 8px;
}

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

.infographic-card {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px;
    background: var(--surface-muted);
}

.infographic-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--gradient);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 18px;
}

.infographic-card h5 {
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--text-main);
    font-size: 16px;
}

.infographic-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

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

.step-card {
    background: var(--surface-muted);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--border);
}

.step-card span {
    display: inline-flex;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gradient);
    color: #fff;
    font-weight: 700;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    font-size: 16px;
}

.step-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 767px) {
    .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);
    }

    .ace-editor-container {
        min-height: 300px;
    }

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

    .output-actions {
        flex-direction: column;
    }

    .copy-btn {
        width: 100%;
    }

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

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

    .infographic-row {
        grid-template-columns: 1fr;
    }

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

