/* Simple Modern White and Blue Theme */

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

:root {
    --primary-blue: #2563eb;
    --light-blue: #3b82f6;
    --dark-blue: #1e40af;
    --white: #ffffff;
    --off-white: #f8fafc;
    --light-gray: #e2e8f0;
    --gray: #64748b;
    --dark-gray: #334155;
    --text: #1e293b;
}

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

/* Header */
.site-header,
.admin-header {
    background: var(--white);
    border-bottom: 1px solid var(--light-gray);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    text-decoration: none;
}

.header-nav {
    display: flex;
    gap: 2rem;
}

.header-nav a {
    color: var(--dark-gray);
    text-decoration: none;
    font-weight: 500;
}

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

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    color: var(--gray);
    font-size: 0.9rem;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

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

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

.btn-secondary {
    background: var(--light-gray);
    color: var(--text);
}

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

.btn-danger {
    background: #ef4444;
    color: var(--white);
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-success {
    background: #10b981;
    color: var(--white);
}

.btn-success:hover {
    background: #059669;
}

.btn-sm {
    padding: 0.375rem 0.875rem;
    font-size: 0.875rem;
}

.btn-action {
    background: var(--white);
    border: 1px solid var(--light-gray);
    padding: 0.5rem 1rem;
    color: var(--text);
}

.btn-action:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary-blue);
    cursor: pointer;
    text-decoration: none;
}

.btn-link:hover {
    text-decoration: underline;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.625rem;
    border: 1px solid var(--light-gray);
    border-radius: 0.375rem;
    font-size: 1rem;
    color: var(--text);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--gray);
    font-size: 0.875rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Auth Box */
.auth-box {
    max-width: 450px;
    margin: 4rem auto;
    padding: 2rem;
    background: var(--white);
    border: 1px solid var(--light-gray);
    border-radius: 0.5rem;
}

.auth-box h1 {
    margin-bottom: 1rem;
    text-align: center;
    color: var(--text);
    font-size: 1.875rem;
}

.subtitle {
    text-align: center;
    color: var(--gray);
    margin-bottom: 2rem;
}

.auth-footer {
    margin-top: 1.5rem;
    text-align: center;
    color: var(--gray);
}

.demo-credentials {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 0.375rem;
}

.demo-credentials h3 {
    margin-bottom: 0.5rem;
    color: #92400e;
    font-size: 0.875rem;
}

.demo-credentials p {
    margin: 0.25rem 0;
    color: var(--text);
    font-size: 0.875rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0.375rem;
    border: 1px solid;
}

.alert-error {
    background: #fee;
    color: #dc2626;
    border-color: #fecaca;
}

.alert-success {
    background: #d1fae5;
    color: #059669;
    border-color: #6ee7b7;
}

/* Feed */
.feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.feed-header h1 {
    font-size: 1.875rem;
    color: var(--text);
}

.posts-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.post-card {
    background: var(--white);
    padding: 1.5rem;
    border: 1px solid var(--light-gray);
    border-radius: 0.5rem;
}

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

.post-user strong {
    display: block;
    font-size: 1rem;
    color: var(--text);
}

.post-date {
    font-size: 0.875rem;
    color: var(--gray);
}

.privacy-badge {
    padding: 0.25rem 0.75rem;
    background: var(--light-blue);
    color: var(--white);
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.post-content {
    margin: 1rem 0;
    line-height: 1.6;
}

.post-image {
    max-width: 100%;
    height: auto;
    margin-top: 1rem;
    border-radius: 0.375rem;
}

.post-location {
    margin-top: 0.5rem;
    color: var(--gray);
    font-size: 0.875rem;
}

.post-stats {
    display: flex;
    gap: 1.5rem;
    padding: 0.75rem 0;
    border-top: 1px solid var(--light-gray);
    border-bottom: 1px solid var(--light-gray);
    margin: 1rem 0;
    color: var(--gray);
    font-size: 0.875rem;
}

.post-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.like-btn.liked {
    color: var(--primary-blue);
    font-weight: 600;
}

.comments-section {
    margin-top: 1rem;
}

.comment {
    padding: 0.75rem;
    background: var(--off-white);
    border-left: 3px solid var(--primary-blue);
    margin-top: 0.5rem;
}

.comment-form {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--off-white);
    border-radius: 0.375rem;
}

.comment-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--light-gray);
    border-radius: 0.375rem;
    resize: vertical;
    min-height: 60px;
}

.comment-input:focus {
    outline: none;
    border-color: var(--primary-blue);
}

/* Create Post */
.create-post-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--white);
    border: 1px solid var(--light-gray);
    border-radius: 0.5rem;
}

.create-post-container h1 {
    font-size: 1.875rem;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.char-count {
    text-align: right;
    display: block;
    color: var(--gray);
    font-size: 0.875rem;
}

#map {
    margin: 1rem 0;
    border: 1px solid var(--light-gray);
    border-radius: 0.375rem;
}

#location-display {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: var(--off-white);
    border-radius: 0.375rem;
}

/* Profile */
.profile-container {
    max-width: 900px;
    margin: 0 auto;
}

.profile-header {
    text-align: center;
    padding: 2rem;
    background: var(--white);
    border: 1px solid var(--light-gray);
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.profile-header h1 {
    font-size: 2rem;
    color: var(--text);
}

.profile-settings {
    background: var(--white);
    padding: 2rem;
    border: 1px solid var(--light-gray);
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.profile-settings h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.profile-posts {
    background: var(--white);
    padding: 2rem;
    border: 1px solid var(--light-gray);
    border-radius: 0.5rem;
}

.profile-posts h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text);
}

/* Admin Dashboard */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    padding: 1.5rem;
    border: 1px solid var(--light-gray);
    border-radius: 0.5rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.stat-card h3 {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray);
}

.admin-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.admin-link-card {
    background: var(--white);
    padding: 1.5rem;
    border: 1px solid var(--light-gray);
    border-radius: 0.5rem;
    text-decoration: none;
}

.admin-link-card:hover {
    border-color: var(--primary-blue);
}

.admin-link-card h3 {
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.admin-link-card p {
    color: var(--gray);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    background: var(--white);
    border: 1px solid var(--light-gray);
    border-collapse: collapse;
    border-radius: 0.5rem;
}

.admin-table thead {
    background: var(--off-white);
    border-bottom: 1px solid var(--light-gray);
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--light-gray);
}

.admin-table th {
    font-weight: 600;
    color: var(--text);
}

.admin-table tbody tr:hover {
    background: var(--off-white);
}

/* Reported Posts */
.reported-post {
    background: var(--off-white);
    padding: 1rem;
    margin: 1rem 0;
    border: 1px solid var(--light-gray);
    border-radius: 0.375rem;
}

.post-preview {
    border-left: 3px solid #ef4444;
    padding-left: 1rem;
    margin-top: 0.75rem;
}

.post-text {
    color: var(--text);
    margin: 0.75rem 0;
    line-height: 1.6;
    background: var(--white);
    padding: 0.75rem;
    border-radius: 0.375rem;
}

.post-author {
    font-size: 0.875rem;
    color: var(--primary-blue);
    font-weight: 600;
}

.post-deleted-notice {
    color: var(--gray);
    font-style: italic;
    padding: 0.75rem;
    background: #fef3c7;
    border-radius: 0.375rem;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.25rem;
}

.badge-success {
    background: #d1fae5;
    color: #059669;
}

.badge-danger {
    background: #fee;
    color: #dc2626;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-info {
    background: #dbeafe;
    color: var(--primary-blue);
}

.badge-secondary {
    background: var(--light-gray);
    color: var(--gray);
}

/* Modal */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background: var(--white);
    margin: 10% auto;
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    border-radius: 0.5rem;
}

.modal-content h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.close {
    color: var(--gray);
    float: right;
    font-size: 1.75rem;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: var(--text);
}

/* Reports */
.reports-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.report-card {
    background: var(--white);
    padding: 1.5rem;
    border: 1px solid var(--light-gray);
    border-radius: 0.5rem;
}

.report-header {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.report-reason,
.admin-note {
    padding: 1rem;
    background: var(--off-white);
    border-left: 3px solid var(--primary-blue);
    margin-top: 0.5rem;
}

.report-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* Utilities */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--gray);
}

.truncate {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-toolbar {
    margin-bottom: 1.5rem;
}

.admin-toolbar h1 {
    font-size: 1.875rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.filter-form,
.search-form {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.pagination {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.pagination a {
    padding: 0.5rem 1rem;
    border: 1px solid var(--light-gray);
    border-radius: 0.375rem;
    text-decoration: none;
    color: var(--text);
}

.pagination a:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.pagination a.active {
    background: var(--primary-blue);
    color: var(--white);
    border-color: var(--primary-blue);
}

/* Friends/Search Pages */
.users-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.user-card {
    background: var(--white);
    padding: 1.5rem;
    border: 1px solid var(--light-gray);
    border-radius: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.user-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--light-gray);
}

.user-avatar-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary-blue);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.user-details h3 {
    margin-bottom: 0.25rem;
    font-size: 1rem;
    color: var(--text);
}

.user-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.text-muted {
    color: var(--gray);
}

.text-muted.small {
    font-size: 0.875rem;
}

.notification-badge {
    background: #ef4444;
    color: var(--white);
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: bold;
    margin-left: 0.25rem;
}

.search-form input[type="text"] {
    flex: 1;
    padding: 0.625rem;
    border: 1px solid var(--light-gray);
    border-radius: 0.375rem;
    font-size: 1rem;
}

.search-form input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.search-form button {
    white-space: nowrap;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--text);
}

/* Links */
a {
    color: var(--primary-blue);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }

    .header-nav {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }

    .feed-header {
        flex-direction: column;
        gap: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .user-card {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .user-info {
        flex-direction: column;
    }

    .user-actions {
        width: 100%;
    }

    .post-card {
        padding: 1rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }
}
