:root {
    --primary: #3B82F6;
    --bg: #0F172A;
    --surface: rgba(30, 41, 59, 0.7);
    --border: rgba(255, 255, 255, 0.1);
    --text: #F8FAFC;
    --text-muted: #94A3B8;
    --warning: #F59E0B;
    --danger: #EF4444;
    --success: #10B981;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    background-image:
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.15), transparent 25%);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.glass-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-top: 2rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #60A5FA, #A78BFA);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.glass-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.glass-panel {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.input-section {
    max-width: 800px;
    margin: 0 auto 3rem auto;
    padding: 2rem;
}

.input-wrapper {
    display: flex;
    gap: 1rem;
    position: relative;
}

input[type="url"],
.editor-input {
    flex: 1;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    width: 100%;
}

input[type="url"]:focus,
.editor-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

button {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
}

button:hover {
    background: #2563EB;
}

button:active {
    transform: scale(0.98);
}

.loader {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 3px solid white;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.hidden {
    display: none !important;
}

.layout-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
}

/* Warnings */
.warnings-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.warning-item {
    background: rgba(245, 158, 11, 0.1);
    border-left: 3px solid var(--warning);
    padding: 0.75rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.warning-item.success {
    background: rgba(16, 185, 129, 0.1);
    border-left-color: var(--success);
}

/* Editor */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.editor-input {
    padding: 0.75rem 1rem;
}

textarea.editor-input {
    resize: vertical;
}

.editor-actions {
    margin-top: 1.5rem;
}

.secondary-btn {
    background: transparent;
    border: 1px solid var(--border);
    width: 100%;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

h2 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

/* Previews container */
.right-col {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.preview-card {
    border-radius: 8px;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #ffffff;
    color: #1c1e21;
}

/* Google Preview */
.google-preview {
    background: transparent;
    color: var(--text);
    font-family: arial, sans-serif;
    padding: 0.5rem 0;
}

.google-url {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 4px;
}

.google-title {
    color: #8ab4f8;
    font-size: 20px;
    margin-bottom: 4px;
    text-decoration: none;
}

.google-title:hover {
    text-decoration: underline;
}

.google-desc {
    color: #bdc1c6;
    font-size: 14px;
    line-height: 1.58;
}

/* Social Card Basics */
.social-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #e2e8f0;
    display: block;
}

.social-img.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 0.9rem;
}

.social-content {
    padding: 12px 16px;
    background: #f1f5f9;
    border-top: 1px solid #e2e8f0;
}

.social-domain {
    text-transform: uppercase;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
}

.social-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.social-desc {
    font-size: 14px;
    color: #475569;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Discord */
.discord-preview {
    background: #2F3136;
    color: #DCDDDE;
    display: flex;
    padding: 16px;
    border-left: 4px solid #5865F2;
    border-radius: 4px;
}

.discord-content {
    flex: 1;
}

.discord-img-container {
    margin-left: 16px;
    flex-shrink: 0;
}

.discord-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.discord-provider {
    font-size: 12px;
    color: #DCDDDE;
    margin-bottom: 4px;
}

.discord-title {
    color: #00AFF4;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
}

.discord-desc {
    font-size: 14px;
    line-height: 1.375;
}

/* Responsive */
@media (max-width: 900px) {
    .layout-grid {
        grid-template-columns: 1fr;
    }
}

.error-message {
    color: var(--danger);
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 8px;
    text-align: center;
}