:root {
    --primary-color: #4f2b20; /* Dark brown */
    --secondary-color: #ea9442; /* Orange/amber */
    --accent-color: #c9515d; /* Coral/red */
    --background-color: #f9f0e2; /* Light beige/cream */
    --text-color: #4f2b20; /* Dark brown for text */
    --light-gray: #f2e8d9; /* Lighter shade of background */
    --border-color: #e5d8c3; /* Medium shade of background */
    --error-color: #c9515d; /* Using the coral/red for error */
    --success-color: #5a9a5a; /* A complementary green */
    --link-hover: #3a1f17; /* Darker brown for hover states */
}

/* Base reset */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.2;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Button styling */
button, .btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.5rem;
    transition: all 0.15s ease-in-out;
    cursor: pointer;
}

button:disabled, .btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

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

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

.btn-secondary {
    color: white;
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-secondary:hover {
    background-color: #d88332; /* Darker orange */
    border-color: #d88332;
}

.btn-accent {
    color: white;
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.btn-accent:hover {
    background-color: #b64550; /* Darker coral */
    border-color: #b64550;
}

.btn-error {
    color: white;
    background-color: var(--error-color);
    border-color: var(--error-color);
}

.btn-error:hover {
    background-color: #b64550; /* Darker coral */
    border-color: #b64550;
}

.btn-outline {
    color: var(--primary-color);
    background-color: transparent;
    border-color: var(--primary-color);
}

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

/* Form elements */
input, textarea, select {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-color);
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--secondary-color);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(234, 148, 66, 0.25); /* Orange with opacity */
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* Previously existing styles */
.auth {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

#profile-dropdown {
    cursor: pointer;
}

.signedInText {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    text-align: left;
    font-size: 14px;
}

nav {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Content Moderation Styles */
.report-button {
    background: none;
    border: none;
    color: var(--accent-color);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.report-button:hover {
    background-color: var(--accent-color);
    color: white;
}

.block-button {
    background: var(--error-color);
    color: white;
    border: 1px solid var(--error-color);
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

.block-button:hover {
    background: #b64550;
    border-color: #b64550;
}

.unblock-button {
    background: var(--success-color);
    color: white;
    border: 1px solid var(--success-color);
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

.unblock-button:hover {
    background: #4a8a4a;
    border-color: #4a8a4a;
}

/* Block button in posts */
.block-user-button {
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    margin-left: 8px;
}

.block-user-button:hover {
    color: #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
}

/* Block button in profile */
.block-btn {
    padding: 8px 16px;
    border: 1px solid;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.2s ease;
    margin-left: 8px;
}

.block-btn.btn-outline {
    color: #666;
    border-color: #dee2e6;
}

.block-btn.btn-danger {
    color: #dc3545;
    border-color: #dc3545;
}

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

.small-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #dc3545;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 4px;
}

/* Tab link styling for profile page */
.tab-link {
    text-decoration: none;
    color: inherit;
}

.tab-link:hover {
    text-decoration: none;
    color: inherit;
}

.moderation-dropdown {
    position: relative;
    display: inline-block;
}

.moderation-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: white;
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    border-radius: 8px;
    z-index: 1;
    border: 1px solid var(--border-color);
}

.moderation-dropdown:hover .moderation-dropdown-content {
    display: block;
}

.moderation-dropdown-content button {
    color: var(--text-color);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    width: 100%;
    text-align: left;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.moderation-dropdown-content button:hover {
    background-color: var(--light-gray);
}

.moderation-dropdown-content button.dangerous {
    color: var(--error-color);
}

.moderation-dropdown-content button.dangerous:hover {
    background-color: #fef2f2;
}

/* Status badges for admin dashboard */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending {
    background-color: #fef3c7;
    color: #d97706;
}

.status-reviewing {
    background-color: #dbeafe;
    color: #2563eb;
}

.status-resolved {
    background-color: #dcfce7;
    color: #16a34a;
}

.status-dismissed {
    background-color: #f3f4f6;
    color: #6b7280;
}

/* Warning and alert styles */
.warning-banner {
    background-color: #fef3c7;
    border: 1px solid #fbbf24;
    color: #92400e;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.error-banner {
    background-color: #fef2f2;
    border: 1px solid #fca5a5;
    color: #dc2626;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.success-banner {
    background-color: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* Terms modal specific styles */
.terms-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.terms-content {
    max-height: 60vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.terms-section {
    margin-bottom: 1.5rem;
}

.terms-section h3 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 0.25rem;
    margin-bottom: 0.75rem;
}

/* Responsive moderation controls */
@media (max-width: 640px) {
    .moderation-dropdown-content {
        min-width: 180px;
        right: -20px;
    }
    
    .report-button,
    .block-button,
    .unblock-button {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .status-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }
}
