:root {
    --bg-color: #0F0F23;
    --primary-color: #6C5CE7;
    --secondary-color: #A29BFE;
    --accent-color: #FD79A8;
    --text-color: #FFFFFF;
    --text-muted: #B2BEC3;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --card-radius: 12px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
}

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

.app-header {
    text-align: center;
    margin-bottom: 3rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.logo-icon {
    color: var(--primary-color);
    width: 32px;
    height: 32px;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

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

@media (max-width: 992px) {
    .app-main {
        grid-template-columns: 1fr;
    }
}

.card {
    border-radius: var(--card-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.card-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.card-header i {
    color: var(--accent-color);
}

.title-with-icon {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Tabs */
.tabs, .preview-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
}

.tab-btn, .p-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 6px;
    transition: var(--transition);
}

.tab-btn:hover, .p-tab-btn:hover {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active, .p-tab-btn.active {
    color: var(--text-color);
    background: var(--primary-color);
}

.tab-content, .preview-content {
    display: none;
}

.tab-content.active, .preview-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

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

input, textarea, select {
    width: 100%;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-color);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(108, 92, 231, 0.2);
}

/* Preview Styles */
.preview-content-container {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 1rem;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Google Preview */
.google-result {
    max-width: 600px;
    width: 100%;
    background: transparent;
}

.google-url-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.google-favicon {
    width: 16px;
    height: 16px;
    background: #5f6368;
    border-radius: 50%;
}

.google-url {
    color: #bdc1c6;
    font-size: 14px;
}

.google-title {
    color: #8ab4f8;
    font-size: 20px;
    margin-bottom: 4px;
    cursor: pointer;
}

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

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

/* Facebook Preview */
.fb-card {
    background: #242526;
    border: 1px solid #3e4042;
    border-radius: 0;
    overflow: hidden;
    max-width: 500px;
    width: 100%;
}

.fb-image {
    height: 260px;
    background-size: cover;
    background-position: center;
    background-color: #3a3b3c;
    background-image: url('https://via.placeholder.com/600x315?text=Preview+Image');
}

.fb-info {
    padding: 12px;
}

.fb-site {
    color: #b0b3b8;
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.fb-title {
    color: #e4e6eb;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
}

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

/* Twitter Preview */
.tw-card {
    background: #000;
    border: 1px solid #2f3336;
    border-radius: 12px;
    overflow: hidden;
    max-width: 500px;
    width: 100%;
}

.tw-image {
    height: 260px;
    background-size: cover;
    background-position: center;
    background-color: #16181c;
    background-image: url('https://via.placeholder.com/600x315?text=Preview+Image');
}

.tw-info {
    padding: 12px;
}

.tw-site {
    color: #71767b;
    font-size: 14px;
    margin-bottom: 2px;
}

.tw-title {
    color: #e7e9ea;
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 2px;
}

.tw-desc {
    color: #71767b;
    font-size: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Code Card */
.code-card {
    margin-top: auto;
}

.code-wrapper {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-all;
}

code {
    font-family: 'JetBrains Mono', 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    color: var(--secondary-color);
}

/* Buttons */
.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background: #5b4bc4;
    transform: translateY(-2px);
}

.btn-primary.small {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--accent-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: none;
    z-index: 1000;
}

.toast.show {
    display: block;
    animation: slideIn 0.3s ease;
}

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

.app-footer {
    text-align: center;
    margin-top: 4rem;
    padding-bottom: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}
