:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --secondary-color: #64748b;
    --secondary-hover: #475569;
    --accent-color: #10b981;
    --accent-hover: #059669;
    --bg-gradient: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-gradient);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.app-header {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: center;
}

.back-btn {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border: 1px solid var(--primary-color);
    border-radius: 20px;
    transition: all 0.2s;
}

.back-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* Main Container */
.app-container {
    flex: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    width: 100%;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2.5rem;
    margin-bottom: 2rem;
}

.card-header {
    text-align: center;
    margin-bottom: 2rem;
}

.card-header h1 {
    font-size: 2rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.card-header p {
    color: var(--text-muted);
}

/* Tool Layout */
.tool-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

textarea {
    width: 100%;
    min-height: 150px;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.2s;
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Options */
.option-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: white;
    font-size: 1rem;
    cursor: pointer;
}

.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* Buttons */
.btn {
    flex: 1;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: var(--secondary-hover);
}

.btn-accent {
    background: var(--accent-color);
    color: white;
    margin-top: 0.75rem;
    width: auto;
}

.btn-accent:hover {
    background: var(--accent-hover);
}

/* Info Section */
.info-section {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.info-section h2,
.info-section h3 {
    margin: 1.5rem 0 1rem;
}

.info-section ul {
    margin-left: 1.5rem;
}

/* SEO Article */
.seo-article {
    margin-top: 4rem;
    padding: 3rem;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    color: var(--text-main);
}

.seo-article h2 {
    font-size: 1.75rem;
    margin: 2.5rem 0 1.25rem;
    color: var(--primary-color);
    border-bottom: 2px solid #f0f9ff;
    padding-bottom: 0.5rem;
}

.seo-article h3 {
    font-size: 1.4rem;
    margin: 2rem 0 1rem;
    color: var(--text-main);
}

.seo-article p {
    margin-bottom: 1.25rem;
    color: #475569;
    font-size: 1.05rem;
}

.seo-article ul {
    margin: 0 0 1.5rem 1.5rem;
}

.seo-article li {
    margin-bottom: 0.5rem;
    color: #475569;
}

.article-img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin: 2rem auto;
    display: block;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Table Design */
.table-container {
    overflow-x: auto;
    margin: 2rem 0;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--text-main);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: #f1f5f9;
}

/* Footer */
.app-footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.app-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

/* Notifications */
#notification-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
}

.notification {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-top: 0.5rem;
    border-left: 4px solid var(--primary-color);
    animation: slideIn 0.3s ease-out;
}

.notification.success {
    border-left-color: var(--accent-color);
}

.notification.error {
    border-left-color: #ef4444;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@media (max-width: 640px) {
    .option-grid {
        grid-template-columns: 1fr;
    }

    .button-group {
        flex-direction: column;
    }

    .seo-article {
        padding: 1.5rem;
    }
}