/* Corporate LinkedIn-Style CSS with Dark Mode */
:root {
    --bg-color: #f3f2ef;
    --text-color: #333333;
    --text-muted: #666666;
    --card-bg: #ffffff;
    --border-color: #e0e0e0;
    --primary-color: #0a66c2;
    --primary-hover: #004182;
    --badge-bg: #e8f3ff;
    --input-bg: #ffffff;
    --document-bg: #ffffff;
    --document-text: #111111;
}

body.dark-mode {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --text-muted: #a0a0a0;
    --card-bg: #1e1e1e;
    --border-color: #333333;
    --primary-color: #4facfe;
    --primary-hover: #00f2fe;
    --badge-bg: #2a2a2a;
    --input-bg: #2d2d2d;
    --document-bg: #f9f9f9;
    --document-text: #111111; /* Paper stays whiteish even in dark mode */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-center {
    text-align: center;
}

/* Navbar */
.navbar {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.3s;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.theme-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    outline: none;
    transition: transform 0.2s;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

/* Ads */
.ad-placeholder {
    background: rgba(128, 128, 128, 0.1);
    border: 1px dashed var(--border-color);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 20px auto;
    border-radius: 8px;
}

.top-ad {
    width: 728px;
    height: 90px;
    max-width: 100%;
}

.in-article-ad {
    width: 100%;
    height: 100px;
    margin-bottom: 25px;
}

/* Hero Section */
.hero {
    padding: 40px 0 30px;
}

.hero h1 {
    font-size: 2.5rem;
    color: var(--text-color);
    margin-bottom: 15px;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto;
}

/* Workspace */
.workspace {
    margin-bottom: 60px;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transition: background-color 0.3s;
}

.card-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 1.1rem;
    color: var(--text-color);
    font-weight: 600;
}

.badge {
    background: var(--badge-bg);
    color: var(--primary-color);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.card-body {
    padding: 25px;
    position: relative;
    min-height: 400px;
}

.relative {
    position: relative;
}

/* Inputs */
.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
}

textarea {
    width: 100%;
    height: 150px;
    padding: 15px;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    resize: none;
    color: var(--text-color);
    transition: border-color 0.2s;
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px var(--primary-color);
}

/* Button */
.primary-btn {
    width: 100%;
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 28px;
    cursor: pointer;
    transition: background-color 0.2s;
}

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

.primary-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.copy-btn {
    background-color: #2ed573;
}
.copy-btn:hover {
    background-color: #26b360;
}

/* Output States */
.empty-state {
    display: flex;
    height: 100%;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 40px;
}

/* Loading */
.loading-state {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--card-bg);
    opacity: 0.9;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.loading-text {
    color: var(--primary-color);
    font-weight: 600;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Document Paper (Result) */
.document-paper {
    background: var(--document-bg);
    font-family: 'Times New Roman', Times, serif;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--document-text);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.visible-text {
    margin-bottom: 15px;
}

/* Ad-Wall / Blur Strategy */
.blurred-text-container {
    position: relative;
    user-select: none;
}

.blurred-content {
    filter: blur(5px);
    opacity: 0.7;
    pointer-events: none;
    transition: filter 0.5s, opacity 0.5s;
}

.paywall-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    text-align: center;
    width: 95%;
    border: 1px solid var(--border-color);
    z-index: 5;
}

.paywall-overlay h3 {
    color: var(--text-color);
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.paywall-overlay p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
    font-family: 'Inter', sans-serif;
}

.paywall-btn {
    background: linear-gradient(135deg, #ff4757, #ff6b81);
    color: #fff;
    border: none;
    padding: 12px 25px;
    font-weight: 700;
    border-radius: 24px;
    cursor: pointer;
    transition: transform 0.2s;
    font-family: 'Inter', sans-serif;
    width: 100%;
}

.paywall-btn:hover {
    transform: scale(1.02);
}

/* Footer */
.footer {
    padding: 30px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

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