* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body,
html {
    height: 100%;
    background-color: #000000;
    color: #e0e0e0;
    line-height: 1.4;
}

/* Site Layout */
.site-layout {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 400px;
    background-color: #1a1a1a;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-right: 1px solid #2d2d2d;
    position: fixed;
    top: 0;
    bottom: 0;
}

.sidebar .logo {
    max-width: 150px;
    margin-bottom: 15px;
}

.sidebar h1 {
    color: #ffffff;
    font-size: 1.5em;
    margin-bottom: 10px;
    text-align: center;
}

.sidebar p {
    color: #eaeaea;
    margin-bottom: 20px;
    text-align: center;
}

.sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

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

.sidebar-actions input[type="submit"] {
    width: 100%;
}

/* Form Layout */
.form-category {
    margin-bottom: 20px;
}

.form-category h3 {
    color: #4CAF50;
    margin-bottom: 10px;
    text-align: left;
    font-size: 1.1em;
    border-bottom: 1px solid #2d2d2d;
    padding-bottom: 5px;
}

.dual-input {
    display: flex;
    gap: 15px;
}

.dual-input .form-group {
    flex: 1;
}

.travel-section {
    margin-bottom: 20px;
    border-bottom: 1px solid #2d2d2d;
    padding-bottom: 20px;
}

.section-title {
    color: #4CAF50;
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.2em;
}

.message-input-container textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #2d2d2d;
    border-radius: 4px;
    background: #141414;
    color: #ffffff;
    resize: vertical;
}

/* Placeholder styling */
::placeholder {
    color: #666;
}

/* Post Container */
.travel-post {
    width: 100%;
    background: linear-gradient(145deg, #1a1a1a, #212121);
    border: 1px solid #2d2d2d;
    border-radius: 16px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* Profile Image */
.profile-image {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 3px solid #4CAF50;
    object-fit: cover;
    margin-right: 20px;
    margin-bottom: -24px;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
    margin-top: 20px
}

/* Post Header */
.post-header {
    display: flex;
    align-items: center;
    padding: 16px 24px; 
    border-bottom: 1px solid #2d2d2d;
    background: rgba(33, 33, 33, 0.8);
    border-radius: 16px 16px 0 0;
    height: 70px
}

.user-info {
    flex-grow: 1;
}

.username {
    color: #ffffff;
    font-size: 1.4em;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.5px;
}

/* Travel Route Section */
.travel-route {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    background: rgba(30, 30, 30, 0.6);
    gap: 40px;
}

.route-location {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.city {
    color: #ffffff;
    font-size: 1.6em;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.state {
    color: #888;
    font-size: 1em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.route-arrow {
    color: #4CAF50;
    font-size: 2em;
    margin: 0 20px;
}

/* Travel Date */
.travel-date {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    background: rgba(26, 26, 26, 0.4);
    border-bottom: 1px solid #2d2d2d;
}

.travel-date span {
    color: #e0e0e0;
    font-size: 1.1em;
    font-weight: 500;
}

.date-icon::before {
    content: "calendar_today";
    font-family: 'Material Symbols Outlined';
    color: #4CAF50;
    font-size: 1.3em;
    vertical-align: middle;
}

/* Post Details */
.post-details-container {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: rgba(26, 26, 26, 0.8);
}

.post-details-container.expanded {
    max-height: 500px;
    padding: 24px 32px;
}

.post-details {
    color: #e0e0e0;
    line-height: 1.8;
    font-size: 1.1em;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

/* Journey Details Toggle */
.post-toggle {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 10px 20px;
    border-radius: 24px;
    background: rgba(76, 175, 80, 0.1);
    transition: all 0.2s ease;
}

.post-toggle:hover {
    background: rgba(76, 175, 80, 0.2);
}

.toggle-text {
    color: #4CAF50;
    font-size: 1em;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.character-count {
    font-size: 0.9em;
    color: #999;
    text-align: right;
    margin-top: 5px;
}

.character-count.exceeded {
    color: red;
}

/* Post Footer */
.post-footer {
    display: flex;
    justify-content: space-around;
    padding: 16px 24px;
    border-top: 1px solid #2d2d2d;
    background: rgba(33, 33, 33, 0.8);
    border-radius: 0 0 16px 16px;
    height: 70px
}

.interaction-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: #888;
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.interaction-btn:hover {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
    transform: translateY(-1px);
}

.interaction-btn.active {
    color: #4CAF50;
}

.interaction-btn .material-symbols-outlined {
    font-size: 1.4em;
}

.interaction-btn .count {
    font-size: 1em;
    font-weight: 500;
}

/* Animation for likes */
.like-btn.active .material-symbols-outlined {
    animation: likeAnimation 0.3s ease;
}

@keyframes likeAnimation {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .dual-input {
        flex-direction: column;
        gap: 10px;
    }
    .message-input-container {
        width: 300px;
    }
}

/* Main Content Layout */
.main-content {
    flex-grow: 1;
    margin-left: 250px;
    margin-right: 0;   
    display: flex;
    justify-content: center;
}

/* Messages Container */
.messages-container {
    flex: 1;
    max-width: 1000px;
    width: 100%;
    height: 100vh;
    overflow-y: auto;
    padding: 20px 40px;
    padding-left: 150px;
}

.message-input-container {
    width: 300px;
    background: #1a1a1a;
    padding: 20px;
    border-left: 1px solid #2d2d2d;
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    overflow-y: auto;
}

.travel-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
}

.action-button {
    background: #1e1e1e;
    border: 1px solid #2d2d2d;
    border-radius: 8px;
    padding: 12px;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    transition: all 0.3s ease;
}

.action-button:hover {
    background: #2d2d2d;
    border-color: #4CAF50;
}

.action-button.active {
    background: #2d2d2d;
    border-color: #4CAF50;
    color: #4CAF50;
}

/* Collapsible Content */
.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.collapsible-content.active {
    max-height: calc(100vh - 500px) !important; 
    overflow-y: auto !important;
}

/* Enhanced Card Styling */
.card {
    border: 1px solid #2d2d2d;
    border-radius: 8px;
    margin-bottom: 20px;
    background: #1a1a1a;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.card:hover {
    border-color: #7575755b;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.1);
}

.card-header {
    background-color: #212121;
    padding: 15px;
    border-bottom: 2px solid #4CAF50;
    border-radius: 8px 8px 0 0;
}

.card-header img {
    width: 45px;
    height: 45px;
    border: 2px solid #4CAF50;
}

.card-body {
    padding: 20px;
    background: #1e1e1e;
}

.card-body p {
    margin: 8px 0;
    color: #e0e0e0;
    font-size: 1.1em;
    line-height: 1.5;
}

.card-body p:first-child {
    color: #4CAF50;
    font-weight: 500;
}

.card-footer {
    padding: 15px 20px;
    background: #1a1a1a;
    border-top: 1px solid #2d2d2d;
    border-radius: 0 0 8px 8px;
}

/* Collapsible Section Styling */
.collapsible-section {
    background-color: #212121;
    border: 1px solid #2d2d2d;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: linear-gradient(to right, #1e1e1e, #2d2d2d);
    cursor: pointer;
    border-bottom: 1px solid #2d2d2d;
}

.collapsible-header h2 {
    margin: 0;
    color: #4CAF50;
    font-size: 1.1em;
}

.collapsible-header .toggle-icon {
    font-size: 1.2em;
    transition: transform 0.3s ease;
    color: #4CAF50;
}

/* Enhanced Input Styling */
.form-group input,
.form-group textarea {
    background: #141414;
    border: 1px solid #2d2d2d;
    padding: 12px;
    border-radius: 6px;
    width: 100%;
    color: #fff;
    font-size: 1.1em;
}

/* Buttons */
#create-post,
#search-posts {
    width: 100%;
    background: #4CAF50;
    color: white;
    padding: 14px;
    border: none;
    border-radius: 6px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Button Group */
.button-group {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.option-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background-color: #1e1e1e;
    color: #e0e0e0;
    border: 1px solid #2d2d2d;
    border-radius: 6px;
    cursor: pointer;
    padding: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.option-btn:hover {
    background-color: #2d2d2d;
    border-color: #4CAF50;
    transform: translateY(-1px);
}

.option-btn.active {
    background-color: #2d2d2d;
    border-color: #4CAF50;
    color: #4CAF50;
}

.count {
    font-size: 0.9em;
    color: #888;
    font-weight: bold;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Modal base */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Modal content */
.modal-content {
    background-color: #2a2a2a;
    border-radius: 12px;
    width: 500px;
    height: 80vh;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Modal header and countdown */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    background-color: #2a2a2a;
    padding: 0;
}

#comment-status-container {
    padding: 15px;
    background-color: #2a2a2a;
    border-bottom: 1px solid #3a3a3a;
    width: 100%;
}

#comment-status-title {
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 5px;
}

#comment-countdown {
    color: #e0e0e0;
    font-size: 14px;
    text-align: center;
    margin-top: 5px;
}

.close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    color: #fff;
    font-size: 24px;
    z-index: 10;
}

/* Comments section */
#modal-comments {
    flex-grow: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Comment bubbles */
.comment-bubble {
    max-width: 80%;
    padding: 12px 15px;
    border-radius: 15px;
    line-height: 1.4;
    word-break: break-word;
    transition: transform 0.2s ease;
}

.comment-bubble:hover {
    transform: scale(1.02);
}

.other-comment {
    background-color: #3a3a3a;
    color: #e0e0e0;
    align-self: flex-start;
    margin-right: auto;
}

.my-comment {
    background-color: #4CAF50;
    color: white;
    align-self: flex-end;
    margin-left: auto;
}

.comment-username {
    font-weight: bold;
    font-size: 0.9em;
    margin-bottom: 5px;
    opacity: 0.7;
}

.comment-text {
    font-size: 1em;
}

/* Comment input area */
.comment-input-container {
    background-color: #1e1e1e;
    padding: 15px;
    border-top: 1px solid #2d2d2d;
}

#new-comment {
    width: 100%;
    background-color: #141414;
    color: white;
    border: 1px solid #2d2d2d;
    border-radius: 8px;
    padding: 10px;
    resize: none;
    transition: border-color 0.3s ease;
}

#new-comment:focus {
    outline: none;
    border-color: #4CAF50;
}

/* Disabled state for closed comments */
#new-comment:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Scrollbar styling */
#modal-comments::-webkit-scrollbar {
    width: 8px;
}

#modal-comments::-webkit-scrollbar-track {
    background: #1e1e1e;
}

#modal-comments::-webkit-scrollbar-thumb {
    background: #3a3a3a;
    border-radius: 4px;
}

#modal-comments::-webkit-scrollbar-thumb:hover {
    background: #4a4a4a;
}

/* Auth Pages */
.auth-content {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-container {
    background: #1a1a1a;
    padding: 30px;
    border-radius: 8px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    margin-right: 250px;
}

/* Form Styles */
.form-group {
    margin-bottom: 15px;
    width: 100%;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #ffffff;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #2d2d2d;
    border-radius: 4px;
    background: #141414;
    color: #ffffff;
}

/* Input Styles */
input[type="submit"],
button {
    background: #1e1e1e;
    color: #ffffff;
    border: 1px solid #2d2d2d;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

input[type="submit"]:hover,
button:hover {
    background: #2d2d2d;
    border-color: #4CAF50;
}

/* Scrollbar Styling */
.messages-container::-webkit-scrollbar {
    width: 8px;
}

.messages-container::-webkit-scrollbar-track {
    background: #141414;
}

.messages-container::-webkit-scrollbar-thumb {
    background: #2d2d2d;
    border-radius: 4px;
}

.messages-container::-webkit-scrollbar-thumb:hover {
    background: #333333;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .main-content {
        margin-right: 0;
        padding-right: 320px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }

    .main-content {
        margin-left: 200px;
    }

    .message-input-container {
        width: 250px;
    }
}


/* Light Mode */

body.light-mode {
    background-color: #f0f4f8;
    color: #334155;
}

body.light-mode .sidebar {
    background-color: #ffffff;
    border-right: 1px solid #e2e8f0;
}

body.light-mode .sidebar h1,
body.light-mode .sidebar p,
body.light-mode .sidebar .logo {
    color: #334155;
}

body.light-mode .action-button {
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

body.light-mode .action-button:hover {
    background: #e8f5e9;
    border-color: #66bb6a;
}

body.light-mode .action-button.active {
    background: #e8f5e9;
    color: #2e7d32;
    border-color: #66bb6a;
}

body.light-mode .collapsible-section {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
}

body.light-mode .collapsible-header {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
}

body.light-mode .travel-form .form-category {
    background: #f1f8e9;
}

body.light-mode .form-group input,
body.light-mode .form-group textarea {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #334155;
}

body.light-mode .messages-container {
    background: #ffffff;
    color: #334155;
}

body.light-mode .travel-post {
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

body.light-mode .post-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

body.light-mode .city,
body.light-mode .username {
    color: #334155;
}

body.light-mode .state {
    color: #64748b;
}

body.light-mode .post-details-container {
    background: #ffffff;
}

body.light-mode .post-details {
    color: #475569;
}

body.light-mode .post-footer {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

body.light-mode .card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

body.light-mode .card-header {
    background: #f8fafc;
    border-bottom: 2px solid #66bb6a;
}

body.light-mode .card-body {
    background: #ffffff;
    color: #475569;
}

body.light-mode .card-footer {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

body.light-mode #search-posts,
body.light-mode #create-post {
    background: #66bb6a;
    color: white;
}

body.light-mode #search-posts:hover,
body.light-mode #create-post:hover {
    background: #4caf50;
}

body.light-mode .modal-content {
    background-color: #ffffff;
}

body.light-mode #comment-status-container {
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

body.light-mode #comment-status-title {
    color: #334155;
}

body.light-mode #comment-countdown {
    color: #64748b;
}

body.light-mode .other-comment {
    background-color: #f1f5f9;
    color: #334155;
}

body.light-mode .my-comment {
    background-color: #66bb6a;
    color: #ffffff;
}

body.light-mode #new-comment {
    background-color: #ffffff;
    color: #334155;
    border: 1px solid #e2e8f0;
}

body.light-mode .close-button {
    color: #000;
}