:root {
    --mtg-primary: #2563eb;
    --mtg-secondary: #1e293b;
    --mtg-bg: #f8fafc;
    --mtg-card: #ffffff;
    --mtg-text: #334155;
    --mtg-border: #e2e8f0;
}

.mtg-wrapper {
    font-family: 'Inter', sans-serif;
    background: var(--mtg-bg);
    padding: 30px 15px;
    color: var(--mtg-text);
    border-radius: 12px;
}

.mtg-header { text-align: center; margin-bottom: 30px; }
.mtg-header h1 { font-weight: 700; color: var(--mtg-secondary); margin-bottom: 10px; }

.mtg-grid { display: grid; grid-template-columns: 1fr 350px; gap: 25px; }

.mtg-card {
    background: var(--mtg-card);
    border: 1px solid var(--mtg-border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    margin-bottom: 25px;
}

.mtg-section-title {
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--mtg-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.mtg-input-group { margin-bottom: 15px; }
.mtg-input-group label { display: flex; justify-content: space-between; font-weight: 500; margin-bottom: 6px; font-size: 14px; }
.char-count { font-size: 12px; color: #64748b; }

.mtg-input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--mtg-border);
    border-radius: 8px;
    font-size: 14px;
    transition: 0.3s;
}

.mtg-input:focus { border-color: var(--mtg-primary); outline: none; box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }

.mtg-row { display: flex; gap: 15px; margin-bottom: 15px; }
.mtg-col { flex: 1; }

.mtg-tabs { display: flex; gap: 10px; margin: 20px 0; border-bottom: 1px solid var(--mtg-border); }
.mtg-tab-btn {
    padding: 10px 15px;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 600;
    color: #94a3b8;
    border-bottom: 2px solid transparent;
}
.mtg-tab-btn.active { color: var(--mtg-primary); border-bottom-color: var(--mtg-primary); }
.mtg-tab-content { display: none; }
.mtg-tab-content.active { display: block; }

/* Buttons */
.mtg-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.mtg-btn-primary { background: linear-gradient(135deg, #2563eb, #1d4ed8); color: white; }
.mtg-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(37,99,235,0.3); }
.mtg-btn-outline { background: white; border: 1px solid var(--mtg-border); }
.mtg-btn-sm { padding: 6px 12px; font-size: 13px; }

/* Previews */
.google-preview { border: 1px solid #dfe1e5; border-radius: 8px; padding: 15px; max-width: 100%; }
.gp-url { color: #202124; font-size: 14px; margin-bottom: 4px; }
.gp-title { color: #1a0dab; font-size: 18px; line-height: 1.3; margin-bottom: 4px; }
.gp-desc { color: #4d5156; font-size: 14px; line-height: 1.5; }

.fb-preview { border: 1px solid #dddfe2; border-radius: 0 0 8px 8px; overflow: hidden; }
.fb-img { height: 150px; background: #f0f2f5; display: flex; align-items: center; justify-content: center; background-size: cover; background-position: center; }
.fb-content { padding: 12px; background: #f0f2f5; }
.fb-domain { font-size: 12px; color: #606770; text-transform: uppercase; }
.fb-title { font-weight: 600; font-size: 16px; margin: 4px 0; }
.fb-desc { font-size: 14px; color: #606770; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* Score */
.mtg-score-card { text-align: center; }
.mtg-score-circle {
    width: 80px; height: 80px; border-radius: 50%; border: 5px solid #22c55e;
    margin: 0 auto 10px; display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.mtg-score-circle span { font-size: 24px; font-weight: 800; }

/* Code Output */
.mtg-code-wrapper { background: #1e293b; border-radius: 8px; position: relative; }
#mtg-code-display { color: #e2e8f0; padding: 20px; font-family: monospace; overflow-x: auto; margin: 0; }
.mtg-code-actions { padding: 10px; border-top: 1px solid #334155; display: flex; gap: 10px; justify-content: flex-end; }

@media (max-width: 992px) {
    .mtg-grid { grid-template-columns: 1fr; }
}