/* ================= GLOBAL STYLES ================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #ffffff;
}

h1, h2, h3 {
    color: #1f2933;
    margin-bottom: 15px;
}

a {
    color: #2563eb;
    text-decoration: underline;
}

a:hover {
    color: #1d4ed8;
}

/* ===== Header ===== */
.nav-header {
	position: sticky;
	top: 0;
	background: #ffffff;
	border-bottom: 1px solid #e5e7eb;
	z-index: 1000;
}

.nav-container {
	max-width: 1100px;
	margin: 0 auto;
	padding: 12px 18px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	position: relative;
}

/* Logo */
.navbar-logo-image {
	height: 36px;
}

/* Desktop nav */
.navbar {
	display: flex;
	gap: 20px;
	align-items: center;
}

.navbar a {
	text-decoration: none;
	color: #374151;
	font-weight: 500;
}

/* Scroll effect */
.navbar.scrolled {
	background: rgba(255,255,255,0.96);
}

/* Hamburger */
.nav-toggle {
	display: none;
	background: none;
	border: none;
	font-size: 1.6rem;
	cursor: pointer;
}

/* User dropdown */
.navbar-alert {
	position: relative;
}

.navbar-alert-image {
	height: 28px;
	cursor: pointer;
}

.dropdown-content {
	display: none;
	position: absolute;
	right: 0;
	top: 42px;
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	min-width: 180px;
	box-shadow: 0 8px 24px rgba(0,0,0,0.08);
	z-index: 1001;
}

.navbar-alert:hover .dropdown-content {
	display: block;
}

/* ================= CONTAINERS ================= */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
}

.container.narrow {
    max-width: 750px;
}

/* ================= HERO SECTION ================= */
.hero {
    background: #f4f7fb;
    text-align: center;
    padding: 80px 20px;
}

.hero h1 {
    font-size: 2.5rem;
}

.hero-sub {
    font-size: 1.1rem;
    color: #4b5563;
    margin-bottom: 30px;
}

.hero-note {
    font-size: 0.9rem;
    color: #6b7280;
	margin: 10px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    align-items: center;
}

.hero-text {
    text-align: left;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
    background: #fff;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: flex-start;
    margin-top: 20px;
	margin-bottom: 20px;
}

/* ================= SECTIONS ================= */
.section {
    padding: 60px 0;
}

.section.light {
    background: #fafafa;
}

.emphasis {
    font-weight: 600;
    color: #111827;
}

/* ================= BUTTONS ================= */
.btn-primary {
    display: inline-block;
    background: #2563eb;
    color: white;
    padding: 14px 28px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
	margin-top: 20px;
	margin-bottom: 20px;
	
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    display: inline-block;
    background: #e5e7eb;
    color: #1f2933;
    padding: 14px 28px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s, color 0.3s;
	margin-top: 20px;
	margin-bottom: 20px;
}

.btn-secondary:hover {
    background: #d1d5db;
    color: #111827;
}

.btn-secondary.danger {
    background: #fee2e2;
    color: #991b1b;
}

.btn-secondary.danger:hover {
    background: #fecaca;
}

/* ================= GRID & CARD ================= */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.05);
}

/* ================= ESSAY LAYOUT ================= */

.essay-layout {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* ================= GENERIC CARD ================= */

.essay-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px 28px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 28px rgba(0,0,0,0.05);
}

/* ================= TITLE CARD ================= */

.essay-title {
    text-align: center;
    padding: 35px 30px;
}

.essay-title h2 {
    margin: 0;
    font-size: 1.7rem;
    color: #111827;
}

.essay-meta {
    margin-top: 6px;
    font-size: 0.9rem;
    color: #6b7280;
}

/* ================= SECTION CARDS ================= */

.essay-section h3 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 1.3rem;
    color: #1f2937;
    padding-left: 12px;
}

.essay-section p {
    margin-bottom: 0;
    color: #374151;
    line-height: 1.75;
}

/* ================= ARGUMENT CARDS (FOR / AGAINST) ================= */

.argument-card {
    position: relative;
    margin-top: 16px;
    padding: 18px 20px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

/* Text inside argument */
.argument-card p {
    margin: 0;
    padding-left: 10px;
}

/* ================= LISTS ================= */
.steps {
    padding-left: 20px;
}

.steps li {
    margin-bottom: 10px;
}

/* ================= NOTE & CTA ================= */
.note {
    margin-top: 20px;
    font-size: 0.95rem;
    color: #555;
}

.cta {
    background: #eef2ff;
    text-align: center;
    padding: 70px 20px;
}

/* ================= ACCOUNT PAGE ================= */

.account-card {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* Header */
.account-header h2 {
    margin-bottom: 6px;
}

.account-meta {
    color: #6b7280;
    font-size: 0.95rem;
}

/* Stats */
.account-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
    background: #f9fafb;
    padding: 18px 20px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

.stat-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: #111827;
}

.stat-value.small {
    font-size: 0.95rem;
    font-weight: 500;
}

.stat-label {
    font-size: 0.85rem;
    color: #6b7280;
}

/* Actions */
.account-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Activity */
.account-activity {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.activity-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
}

.activity-card h3 {
    margin-top: 0;
    margin-bottom: 12px;
}

.activity-card ul {
    padding-left: 18px;
}

.activity-card li {
    margin-bottom: 8px;
    font-size: 0.95rem;
}

/* Footer */
.account-footer {
    text-align: center;
}

/* ================= FOOTER ================= */
footer {
    text-align: center;
    font-size: 0.8rem;
    color: #777;
    padding: 20px;
    border-top: 1px solid #eee;
}

/* ================= FORMS ================= */
#queryForm {
    background: #ffffff;
    border-radius: 14px;
    padding: 35px 30px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.06);
    border: 1px solid #e5e7eb;
    max-width: 800px;       /* constrain the form width */
    margin: 0 auto;         /* center form horizontally */
	width:100%;
}

#queryForm.narrow {
    max-width: 600px;
}

#queryForm h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.6rem;
    text-align: center;
}

#queryForm p {
    margin-top: 10px;
    margin-bottom: 10px;
}

#queryForm .form-intro,
#queryForm .form-cta {
    text-align: center;
    color: #374151;
}

/* Input wrapper */
#queryForm .form-field {
    width: 100%;
}

#queryForm form {
    display: flex;
    flex-direction: column;
    gap: 15px;             /* space between input fields */
    width: 100%;        /* ensure form fills container */	
}

#queryForm input {
    max-width: 100%;         /* fill form width */
    padding: 14px 14px;
    font-size: 1rem;
    border-radius: 6px;
    border: 1px solid #ccc;
    box-sizing: border-box;
    display: block;      /* ensure block-level for full width */
}

#queryForm button {
    width: 100%;
    padding: 14px 14px;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    background: #2563eb;
    color: white;
    cursor: pointer;
    transition: transform 0.05s, box-shadow 0.2s, background 0.2s;
}

#queryForm button:hover:not(:disabled) {
    background: #1d4ed8;
    box-shadow: 0 8px 18px rgba(37,99,235,0.25);
}

#queryForm button:active:not(:disabled) {
    transform: translateY(1px);
}

#queryForm button:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* Checkbox row */
#queryForm .checkbox-row {
    margin-top: 17px;
}

#queryForm .checkbox-row label {
    display: flex;
    align-items: flex-start;   
    gap: 10px;
    font-size: 0.95rem;
    line-height: 1.4;
    color: #374151;
    cursor: pointer;
}

#queryForm input[type="checkbox"] {
    width: auto;
	margin-left: 10px;
    margin-top: 5px;
    flex-shrink: 0;
}

/* Center the register link */
#queryForm .form-footer {
    text-align: center;
    margin-top: 15px;
}

#queryForm .form-footer a {
    display: inline-block;
    text-decoration: none;
    padding: 10px 16px;
    background-color: #e5e7eb;
    color: #1f2937;
    border-radius: 6px;
    transition: background 0.2s;
}

#queryForm .form-footer a:hover {
    background-color: #d1d5db;
}

/* ================= OUTPUT PANEL ================= */
#openAIReply {
    margin-top: 40px;
    padding: 30px;
    background: #f8fafc;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 25px rgba(0,0,0,0.04);
    line-height: 1.7;
}

#openAIReply h3 {
    margin-top: 0;
}

#openAIReply p {
    margin-bottom: 14px;
}

#openAIReply button {
    width: 100%;
    padding: 14px;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    background: #2563eb;
    color: white;
    cursor: pointer;
    transition: transform 0.05s, box-shadow 0.2s, background 0.2s;
}

#openAIReply button:hover:not(:disabled) {
    background: #1d4ed8;
    box-shadow: 0 8px 18px rgba(37,99,235,0.25);
}

#openAIReply button:active:not(:disabled) {
    transform: translateY(1px);
}

#openAIReply button:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {

	.nav-toggle {
		display: block;
	}

	.navbar {
		display: none;
		position: absolute;
		top: 64px;
		left: 0;
		right: 0;
		flex-direction: column;
		background: #ffffff;
		border-top: 1px solid #e5e7eb;
	}

	.navbar a {
		padding: 14px 18px;
		border-bottom: 1px solid #f3f4f6;
	}

	.navbar.active {
		display: flex;
	}

    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

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

    .hero-image {
        margin-top: 30px;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .account-activity {
        grid-template-columns: 1fr;
    }
	
    #queryForm {
        padding: 25px 20px;
    }

    #openAIReply {
        padding: 22px 20px;
    }
}
