/* --- Google Fonts: Poppins --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #6a11cb;
    --secondary-color: #2575fc;
    --background-color: #f4f7fc;
    --text-color: #343a40;
    --container-bg: #ffffff;
    --border-color: #dee2e6;
    --light-gray: #f8f9fa;
    --success-color: #28a745;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.7;
    margin: 0;
    padding-top: 80px;
}

/* --- Navigation Bar --- */
.navbar {
    background-color: var(--container-bg);
    padding: 15px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 25px;
}

.nav-brand {
    font-size: 1.6rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

.nav-menu li { margin-left: 35px; }
.nav-menu a { text-decoration: none; color: var(--text-color); font-weight: 600; transition: color 0.3s; }
.nav-menu a:hover { color: var(--primary-color); }

.nav-toggle {
    display: none;
    font-size: 1.8rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary-color);
    padding: 5px;
}

/* --- Main Content & Tool --- */
.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

header { text-align: center; margin-bottom: 40px; }
header h1 { margin: 0; color: var(--text-color); font-weight: 700; font-size: 2.8rem; }
header p { font-size: 1.2rem; color: #555; margin-top: 10px; }

.paraphraser-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.textarea-container {
    background: var(--container-bg);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.07);
    display: flex;
    flex-direction: column;
}

.textarea-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.textarea-header h2 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--secondary-color);
}

.char-count {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

textarea {
    width: 100%;
    min-height: 300px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    resize: vertical;
    flex-grow: 1;
}
textarea:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(106, 17, 203, 0.2); }

#output-text { background-color: var(--light-gray); }

.controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin: 30px 0;
}

#mode-select {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    width: 250px;
}

#paraphrase-btn {
    padding: 15px 40px;
    border: none;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}
#paraphrase-btn:hover { transform: translateY(-3px); box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3); }
#paraphrase-btn:disabled { background: #aaa; cursor: not-allowed; }

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.copy-btn {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}
.copy-btn.copied { background: var(--success-color); }

/* --- Ads & Static Pages --- */
.ad-placeholder-container { margin: 40px auto; text-align: center; }
.ad-label { display: block; font-size: 0.8rem; color: #6c757d; margin-bottom: 10px; font-weight: 600; text-transform: uppercase; }
.ad-box { display: inline-flex; align-items: center; justify-content: center; background-color: #e9ecef; border-radius: 4px; margin: auto; border: 1px dashed var(--border-color); }
.static-page-container { max-width: 900px; margin: 40px auto; background: var(--container-bg); padding: 30px 40px; border-radius: 12px; box-shadow: 0 6px 25px rgba(0, 0, 0, 0.07); }
.static-page-content h1 { font-size: 2.2rem; color: var(--secondary-color); }
.static-page-content h2 { font-size: 1.5rem; margin-top: 40px; }
.static-page-content p, .static-page-content li { font-size: 1rem; color: #444; }

/* --- Footer --- */
footer { text-align: center; margin-top: 40px; padding: 25px 0; border-top: 1px solid var(--border-color); }
.footer-nav { margin-bottom: 20px; }
.footer-nav a { color: #555; text-decoration: none; margin: 0 15px; font-weight: 600; }
.footer-nav a:hover { text-decoration: underline; color: var(--primary-color); }
footer p { font-size: 0.9rem; color: #777; margin: 0; }

/* --- Responsive Styles --- */
@media (max-width: 992px) {
    .paraphraser-layout { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    body { padding-top: 70px; }
    .nav-brand { font-size: 1.3rem; white-space: nowrap; }
    .nav-menu { display: none; position: absolute; top: 70px; left: 0; width: 100%; background-color: #fff; flex-direction: column; text-align: center; box-shadow: 0 4px 8px rgba(0,0,0,0.1); }
    .nav-menu.active { display: flex; }
    .nav-menu li { margin: 0; width: 100%; }
    .nav-menu a { display: block; padding: 15px 0; border-bottom: 1px solid #f0f0f0; }
    .nav-toggle { display: block; }
    .container, .static-page-container { padding: 20px; }
    header h1 { font-size: 2rem; }
}

/* Ad Box Responsive */
.ad-placeholder-container.top-ad .ad-box,
.ad-placeholder-container.content-ad .ad-box { max-width: 300px; min-height: 250px; width: 100%; }

@media (min-width: 768px) {
    .ad-placeholder-container.top-ad .ad-box { max-width: 728px; min-height: 90px; }
    .ad-placeholder-container.content-ad .ad-box { max-width: 336px; min-height: 280px; }
}
