/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #f0f4f8, #e6f0fa);
    background-color: #fff; /* Merged from provided CSS */
    color: #000; /* Merged from provided CSS */
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
}

body.dark-mode {
    background: linear-gradient(135deg, #1a1a2e, #1e2a44);
    background-color: #333; /* Merged from provided CSS */
    color: #fff; /* Merged from provided CSS */
}

/* Container */
.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 15px;
    flex: 1 0 auto;
    position: relative;
    animation: fadeIn 0.5s ease-in-out;
    background-color: #fff; /* Merged from provided CSS */
    color: #000; /* Merged from provided CSS */
}

body.dark-mode .container {
    background-color: #444; /* Merged from provided CSS */
    color: #fff; /* Merged from provided CSS */
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background 0.3s ease, box-shadow 0.3s ease;
    border-bottom: 2px solid #f5a623;
}

body.dark-mode .header {
    background: rgba(26, 26, 46, 0.9);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border-bottom: 2px solid #ff6b6b;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 0 15px;
    gap: 15px;
}

.logo h1 a {
    color: #ff4d4d;
    text-decoration: none;
    font-size: 28px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
    text-shadow: 0 0 5px rgba(255, 77, 77, 0.3);
}

body.dark-mode .logo h1 a {
    color: #ff6b6b;
    text-shadow: 0 0 5px rgba(255, 107, 107, 0.3);
}

.logo-image {
    max-height: 40px;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.logo-image:hover {
    transform: scale(1.1) rotate(5deg);
    filter: brightness(1.2);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.search-form {
    position: relative;
    display: flex;
    gap: 10px;
    background: #fff;
    border-radius: 25px;
    padding: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

body.dark-mode .search-form {
    background: #2a2a3e;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.search-input {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    width: 100%;
    transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
    outline: none;
}

body.dark-mode .search-input {
    background: #2a2a3e;
    border-color: #444;
    color: #e0e0e0;
}

.search-input:focus {
    border-color: #00c4cc;
    box-shadow: 0 0 10px rgba(0, 196, 204, 0.5);
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 1000;
    min-height: 40px;
    max-height: 300px;
    overflow-y: auto;
    animation: popUp 0.2s ease-out;
}

body.dark-mode .search-suggestions {
    background: rgba(30, 30, 46, 0.95);
}

@keyframes popUp {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.suggestion-item {
    padding: 10px 15px;
    cursor: pointer;
    font-size: 14px;
    min-height: 60px;
    width: 100%;
    box-sizing: border-box;
    transition: background 0.2s ease, color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-item:hover {
    background: #ff4d4d;
    color: #fff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.suggestion-pic {
    width: 40px;
    height: 40px;
    border-radius: 5px;
    overflow: hidden;
    background: #f0f8ff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.suggestion-pic img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    display: block;
    border-radius: 15px;
}

.suggestion-pic .profile-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #333;
}

body.dark-mode .suggestion-pic {
    background: #2a2a3e;
}

body.dark-mode .suggestion-pic .profile-placeholder {
    color: #e0e0e0;
}

.suggestion-info {
    display: flex;
    flex-direction: column;
}

.suggestion-username {
    font-weight: 600;
    color: #00c4cc;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.dark-mode .suggestion-username {
    color: #66d9e8;
}

.suggestion-age,
.suggestion-gender {
    font-size: 12px;
    color: #666;
}

body.dark-mode .suggestion-age,
body.dark-mode .suggestion-gender {
    color: #999;
}

.search-button {
    padding: 10px 20px;
    background: #00c4cc;
    color: #fff;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.search-button::after {
    content: '✨';
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    font-size: 16px;
}

.search-button:hover {
    background: #009ba1;
    transform: scale(1.05) rotate(-5deg);
    box-shadow: 0 0 15px rgba(0, 196, 204, 0.5);
}

.theme-toggle button {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.2s ease, color 0.3s ease;
    padding: 5px;
    border-radius: 50%;
}

.theme-toggle button:hover {
    transform: rotate(360deg) scale(1.2);
    color: #f5a623;
    text-shadow: 0 0 10px #f5a623;
}

.auth-links a {
    color: #00c4cc;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

body.dark-mode .auth-links a {
    color: #66d9e8;
}

body.dark-mode a {
    color: #1e90ff; /* Merged from provided CSS */
}

.auth-links a:hover {
    color: #f5a623;
    text-shadow: 0 0 5px #f5a623;
}

/* Profile Dropdown */
.user-profile {
    position: relative;
}

.profile-dropdown {
    position: relative;
}

.profile-pic-container {
    width: 40px;
    height: 40px;
    border: 2px solid #f5a623;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    background: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-pic-container:hover {
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(245, 166, 35, 0.5);
}

.header-profile-pic {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border: none;
    transition: filter 0.3s ease;
}

.header-profile-pic:hover {
    filter: brightness(1.2);
}

.profile-placeholder {
    width: 100%;
    height: 100%;
    background: #f0f8ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    border: none;
    transition: background 0.3s ease;
}

body.dark-mode .profile-placeholder {
    background: #2a2a3e;
}

.profile-details p a {
    color: #007bff;
    text-decoration: underline;
}

.profile-details p a:hover {
    color: #0056b3;
}

.notification-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4d4d;
    color: #fff;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
    min-width: 18px;
    text-align: center;
    animation: bounce 0.5s ease-in-out;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 50px;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    min-width: 150px;
    z-index: 1000;
    padding: 5px 0;
    border: 1px solid #ddd;
    animation: slideDown 0.2s ease-out;
}

body.dark-mode .dropdown-menu {
    background: rgba(30, 30, 46, 0.95);
    border-color: #444;
}

@keyframes slideDown {
    from { transform: translateY(-10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.dropdown-menu a {
    display: block;
    padding: 10px 15px;
    color: #00c4cc;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease, background 0.2s ease, transform 0.2s ease;
}

body.dark-mode .dropdown-menu a {
    color: #66d9e8;
}

.dropdown-menu a:hover {
    background: #f5a623;
    color: #fff;
    transform: translateX(5px);
}

.logout-link {
    color: #ff4d4d !important;
}

body.dark-mode .logout-link {
    color: #ff6b6b !important;
}

/* Navigation */
.nav {
    background: #fff;
    padding: 10px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-bottom: 1px dashed #00c4cc;
}

body.dark-mode .nav {
    background: #1e1e2e;
    border-bottom: 1px dashed #66d9e8;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 20px;
    padding: 0 15px;
    align-items: center;
}

.nav-link {
    color: #00c4cc;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: color 0.3s ease, transform 0.2s ease, text-shadow 0.3s ease;
    position: relative;
    padding: 5px 10px;
}

body.dark-mode .nav-link {
    color: #66d9e8;
}

.nav-link:hover {
    color: #f5a623;
    transform: translateY(-2px);
    text-shadow: 0 0 10px #f5a623;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #f5a623;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Latest Online */
.latest-online {
    margin-top: 15px;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, background 0.3s ease;
    direction: ltr;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

body.dark-mode .latest-online {
    background: rgba(30, 30, 46, 0.9);
}

.latest-online:hover {
    transform: translateY(-5px);
}

.latest-online h3 {
    font-size: 18px;
    color: #ff4d4d;
    margin-bottom: 10px;
    text-align: center;
    padding: 10px;
    background: #fff;
    border-radius: 10px 10px 0 0;
    width: 100%;
    max-width: 600px;
    display: flex;
    justify-content: center;
    box-sizing: border-box;
}

body.dark-mode .latest-online h3 {
    color: #ff6b6b;
    background: #1e1e2e;
}

.online-grid {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    flex-direction: row;
    max-width: 600px;
    padding: 15px;
    background: #fff;
    border-radius: 0 0 15px 15px;
    width: 100%;
    box-sizing: border-box;
}

body.dark-mode .online-grid {
    background: #2a2a3e;
}

.online-user {
    text-align: center;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
    min-width: 100px;
    max-width: 120px;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.online-user:hover {
    transform: scale(1.05) rotate(2deg);
}

.online-pic-container {
    width: 100px;
    height: 100px;
    border: 2px solid #f5a623;
    border-radius: 15px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
}

body.dark-mode .online-pic-container {
    background: #2a2a3e;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.online-pic-frame {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.online-pic-frame:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(245, 166, 35, 0.5);
}

.online-user-pic {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border: none;
    transition: filter 0.3s ease;
}

.online-user-pic:hover {
    filter: brightness(1.2);
}

.profile-placeholder-frame {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 15px;
    overflow: hidden;
}

.online-user a.username-link {
    color: #00c4cc;
    font-size: 16px;
    text-decoration: none;
    display: block;
    margin-top: 5px;
    font-weight: 600;
    text-align: center;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

body.dark-mode .online-user a.username-link {
    color: #66d9e8;
}

.online-user a.username-link:hover {
    color: #f5a623;
    text-shadow: 0 0 5px #f5a623;
}

/* Main Content Layout */
.main-content {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.news-feed, .sidebar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: background 0.3s ease, transform 0.3s ease;
}

body.dark-mode .news-feed, body.dark-mode .sidebar {
    background: rgba(30, 30, 46, 0.9);
}

.news-feed {
    width: 70%;
}

.sidebar {
    width: 30%;
}

/* Welcome Message */
.welcome-message {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

body.dark-mode .welcome-message {
    background: rgba(30, 30, 46, 0.9);
}

.welcome-message:hover {
    transform: scale(1.02);
}

.welcome-message h2 {
    font-size: 26px;
    color: #ff4d4d;
    margin-bottom: 10px;
    text-align: center;
    text-shadow: 0 0 5px rgba(255, 77, 77, 0.3);
}

body.dark-mode .welcome-message h2 {
    color: #ff6b6b;
    text-shadow: 0 0 5px rgba(255, 107, 107, 0.3);
}

.welcome-message p {
    font-size: 16px;
    color: #333;
    text-align: center;
    padding: 0 10px;
}

body.dark-mode .welcome-message p {
    color: #e0e0e0;
}

/* Post Box */
.post-box {
    background: rgba(240, 248, 255, 0.8);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

body.dark-mode .post-box {
    background: rgba(42, 42, 62, 0.8);
}

.post-box::before {
    content: '💬';
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 24px;
    opacity: 0.3;
}

.post-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 15px rgba(0, 196, 204, 0.3);
}

.post-box h3 {
    font-size: 20px;
    color: #00c4cc;
    margin-bottom: 10px;
    text-align: center;
}

body.dark-mode .post-box h3 {
    color: #66d9e8;
}

.post-box textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 10px;
    resize: vertical;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

body.dark-mode .post-box textarea {
    background: #2a2a3e;
    border-color: #444;
    color: #e0e0e0;
}

.post-box textarea:focus {
    outline: none;
    border-color: #00c4cc;
    box-shadow: 0 0 10px rgba(0, 196, 204, 0.5);
}

.post-box button {
    padding: 10px 20px;
    background: #00c4cc;
    color: #fff;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    display: block;
    margin: 10px auto 0;
}

.post-box button:hover {
    background: #009ba1;
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 0 15px rgba(0, 196, 204, 0.5);
}

/* Join Message */
.join-message {
    background: rgba(240, 248, 255, 0.8);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

body.dark-mode .join-message {
    background: rgba(42, 42, 62, 0.8);
}

.join-message:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 15px rgba(245, 166, 35, 0.3);
}

.join-message p {
    font-size: 14px;
    color: #333;
}

body.dark-mode .join-message p {
    color: #e0e0e0;
}

.join-message a {
    color: #00c4cc;
    font-weight: 600;
    text-decoration: none;
    position: relative;
}

body.dark-mode .join-message a {
    color: #66d9e8;
}

.join-message a::after {
    content: '🌈';
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.join-message a:hover {
    color: #f5a623;
}

.join-message a:hover::after {
    transform: scale(1.5);
}

/* Posts Container */
#posts-container {
    margin-top: 20px;
}

.post {
    background: rgba(249, 249, 249, 0.9);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

body.dark-mode .post {
    background: rgba(42, 42, 62, 0.9);
}

.post::before {
    content: '📝';
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 20px;
    opacity: 0.2;
}

.post:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 15px rgba(0, 196, 204, 0.3);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.post-pic-container {
    width: 60px;
    height: 60px;
}

.post-pic-frame {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-pic-frame:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(245, 166, 35, 0.5);
}

.post-pic {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 2px solid #f5a623;
}

.post-placeholder {
    width: 100%;
    height: 100%;
    background: #f0f8ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border: 2px solid #f5a623;
    border-radius: 15px;
    transition: background 0.3s ease;
}

body.dark-mode .post-placeholder {
    background: #2a2a3e;
}

.post-info a {
    color: #00c4cc;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

body.dark-mode .post-info a {
    color: #66d9e8;
}

.post-info a:hover {
    color: #f5a623;
    text-shadow: 0 0 5px #f5a623;
}

.post-info small {
    color: #666;
    font-size: 12px;
}

body.dark-mode .post-info small {
    color: #999;
}

/* Flytta in Box */
.flytta-in-box {
    background: rgba(240, 248, 255, 0.8);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

body.dark-mode .flytta-in-box {
    background: rgba(42, 42, 62, 0.8);
}

.flytta-in-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 15px rgba(245, 166, 35, 0.3);
}

.flytta-in-box h3 {
    font-size: 20px;
    color: #00c4cc;
    margin-bottom: 10px;
    text-align: center;
}

body.dark-mode .flytta-in-box h3 {
    color: #66d9e8;
}

.flytta-in-box p {
    font-size: 14px;
    color: #333;
}

body.dark-mode .flytta-in-box p {
    color: #e0e0e0;
}

.register-button {
    display: inline-block;
    padding: 10px 20px;
    background: #f5a623;
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.register-button::after {
    content: '✨';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.register-button:hover {
    background: #e6951a;
    transform: scale(1.05);
    box-shadow: 0 0 15px #f5a623;
}

.register-button:hover::after {
    opacity: 1;
}

/* Login Box */
.login-box {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 15px;
    position: relative;
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

body.dark-mode .login-box {
    background: rgba(30, 30, 46, 0.9);
}

.login-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 15px rgba(0, 196, 204, 0.3);
}

.login-box::before {
    content: '🏠';
    font-size: 24px;
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 0 10px;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

body.dark-mode .login-box::before {
    background: rgba(30, 30, 46, 0.9);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.login-box h3 {
    font-size: 20px;
    color: #00c4cc;
    text-align: center;
    margin-bottom: 15px;
}

body.dark-mode .login-box h3 {
    color: #66d9e8;
}

.login-box form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-box label {
    font-size: 14px;
    color: #333;
}

body.dark-mode .login-box label {
    color: #e0e0e0;
}

.login-box input {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

body.dark-mode .login-box input {
    background: #2a2a3e;
    border-color: #444;
    color: #e0e0e0;
}

.login-box input:focus {
    outline: none;
    border-color: #00c4cc;
    box-shadow: 0 0 10px rgba(0, 196, 204, 0.5);
}

.login-box button {
    padding: 12px;
    background: #00c4cc;
    color: #fff;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.login-box button:hover {
    background: #009ba1;
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 0 15px rgba(0, 196, 204, 0.5);
}

.login-box .errors p {
    color: #d32f2f; /* Updated to match .errors */
    font-size: 12px;
    margin: 5px 0;
    text-align: center;
}

body.dark-mode .login-box .errors p {
    color: #d32f2f; /* Updated to match .errors */
}

/* Online Users and Birthday Users */
.online-users, .birthday-users {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

body.dark-mode .online-users, body.dark-mode .birthday-users {
    background: rgba(30, 30, 46, 0.9);
}

.online-users:hover, .birthday-users:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 15px rgba(0, 196, 204, 0.3);
}

.online-users h3, .birthday-users h3 {
    font-size: 20px;
    color: #00c4cc;
    margin-bottom: 10px;
    text-align: center;
}

body.dark-mode .online-users h3, body.dark-mode .birthday-users h3 {
    color: #66d9e8;
}

.user-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 20px;
    justify-items: center;
    /* Enhanced for dynamic insertion */
    animation: fadeIn 0.5s ease-in-out;
}

.user-card {
    text-align: center;
    background: #fff;
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 150px;
    overflow: hidden;
    /* Consistent with other cards */
    display: flex;
    flex-direction: column;
    align-items: center;
}

body.dark-mode .user-card {
    background: #2a2a3e;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.user-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(245, 166, 35, 0.5);
}

.user-pic-container {
    width: 100px;
    height: 100px;
    border: 2px solid #f5a623;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 10px;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
}

body.dark-mode .user-pic-container {
    background: #2a2a3e;
}

.user-pic {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.user-pic:hover {
    transform: scale(1.1);
    filter: brightness(1.2);
}

.profile-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f8ff;
    font-size: 24px;
    transition: background 0.3s ease;
}

body.dark-mode .profile-placeholder {
    background: #2a2a3e;
}

.user-info {
    margin-top: 10px;
}

.username {
    font-weight: 600;
    color: #00c4cc;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

body.dark-mode .username {
    color: #66d9e8;
}

.age {
    font-size: 14px;
    color: #333;
    display: block;
}

body.dark-mode .age {
    color: #e0e0e0;
}

.gender {
    font-size: 16px;
    display: block;
    margin-top: 5px;
}

/* Enhanced Search Results Header */
.search-results-header {
    font-size: 26px;
    color: #ff4d4d;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 0 0 5px rgba(255, 77, 77, 0.3);
    animation: fadeIn 0.5s ease-in-out;
}

body.dark-mode .search-results-header {
    color: #ff6b6b;
    text-shadow: 0 0 5px rgba(255, 107, 107, 0.3);
}

/* Ensure user-card links inherit correct styles */
.user-card a {
    text-decoration: none;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.user-card a:hover .username {
    color: #f5a623;
    text-shadow: 0 0 5px #f5a623;
}

/* SVT News Section */
.svt-news {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 15px;
    margin-top: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

body.dark-mode .svt-news {
    background: rgba(30, 30, 46, 0.9);
}

.svt-news:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 15px rgba(255, 77, 77, 0.3);
}

.svt-news h3 {
    font-size: 20px;
    color: #ff4d4d;
    margin-bottom: 10px;
    text-align: center;
    text-shadow: 0 0 5px rgba(255, 77, 77, 0.3);
}

body.dark-mode .svt-news h3 {
    color: #ff6b6b;
    text-shadow: 0 0 5px rgba(255, 107, 107, 0.3);
}

.news-item {
    padding: 15px;
    border-left: 4px solid #00c4cc;
    background: rgba(240, 248, 255, 0.8);
    border-radius: 10px;
    margin-bottom: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

body.dark-mode .news-item {
    background: rgba(42, 42, 62, 0.8);
    border-left: 4px solid #66d9e8;
}

.news-item:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 10px rgba(0, 196, 204, 0.3);
}

.news-item h4 a {
    color: #00c4cc;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

body.dark-mode .news-item h4 a {
    color: #66d9e8;
}

.news-item h4 a:hover {
    color: #f5a623;
    text-shadow: 0 0 5px #f5a623;
}

.news-item p {
    font-size: 14px;
    color: #333;
}

body.dark-mode .news-item p {
    color: #e0e0e0;
}

.news-item small {
    color: #666;
    font-size: 12px;
}

body.dark-mode .news-item small {
    color: #999;
}

/* Load More Button */
.load-more-button {
    display: block;
    width: 100%;
    padding: 12px;
    background: #00c4cc;
    color: #fff;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    margin-top: 15px;
}

.load-more-button:hover {
    background: #009ba1;
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 0 15px rgba(0, 196, 204, 0.5);
}

/* Profile Frame Layout */
.profile-frame {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
    animation: fadeIn 0.5s ease-in-out;
    background-color: #fff; /* Merged from provided CSS */
    color: #000; /* Merged from provided CSS */
}

body.dark-mode .profile-frame {
    background-color: #444; /* Merged from provided CSS */
    color: #fff; /* Merged from provided CSS */
}

.profile-picture-section {
    flex: 1;
    min-width: 250px;
    background: rgba(255, 255, 255, 0.9);
    background-color: #fff; /* Merged from provided CSS */
    color: #000; /* Merged from provided CSS */
    backdrop-filter: blur(8px);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

body.dark-mode .profile-picture-section {
    background: rgba(30, 30, 46, 0.9);
    background-color: #444; /* Merged from provided CSS */
    color: #fff; /* Merged from provided CSS */
}

.profile-middle {
    flex: 2;
    min-width: 400px;
    background: rgba(255, 255, 255, 0.9);
    background-color: #fff; /* Merged from provided CSS */
    color: #000; /* Merged from provided CSS */
    backdrop-filter: blur(8px);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

body.dark-mode .profile-middle {
    background: rgba(30, 30, 46, 0.9);
    background-color: #444; /* Merged from provided CSS */
    color: #fff; /* Merged from provided CSS */
}

.profile-right {
    flex: 1;
    min-width: 250px;
    background: rgba(255, 255, 255, 0.9);
    background-color: #fff; /* Merged from provided CSS */
    color: #000; /* Merged from provided CSS */
    backdrop-filter: blur(8px);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

body.dark-mode .profile-right {
    background: rgba(30, 30, 46, 0.9);
    background-color: #444; /* Merged from provided CSS */
    color: #fff; /* Merged from provided CSS */
}

.profile-picture-section:hover,
.profile-middle:hover,
.profile-right:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 196, 204, 0.3);
}

/* Profile Image Container */
.profile-image-container {
    position: relative;
    text-align: center;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.profile-image-container:hover {
    transform: scale(1.05);
}

.profile-image {
    display: inline-block;
    position: relative;
    width: 200px;
    height: 350px;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid #f5a623;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.3s ease;
}

.profile-image:hover img {
    filter: brightness(1.2);
}

.profile-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 150px;
    height: 150px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 15px;
    font-size: 18px;
}

.profile-image-container:hover .profile-image-overlay {
    opacity: 1;
}

.profile-actions {
    margin-top: 15px;
    text-align: center;
}

.action-button {
    display: inline-block;
    padding: 10px 20px;
    background: #00c4cc;
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    margin: 0 5px;
    position: relative;
    overflow: hidden;
}

body.dark-mode .action-button {
    background-color: #555; /* Merged from provided CSS */
    color: #fff; /* Merged from provided CSS */
}

.action-button::before {
    content: '🚀';
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.action-button:hover {
    background: #009ba1;
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 196, 204, 0.5);
}

.action-button:hover::before {
    opacity: 1;
}

/* Quick Links */
.quick-links {
    list-style: none;
    padding: 0;
}

.quick-links li {
    margin-bottom: 10px;
}

.quick-links a {
    color: #00c4cc;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s ease, transform 0.2s ease, text-shadow 0.3s ease;
}

body.dark-mode .quick-links a {
    color: #66d9e8;
}

.quick-links a:hover {
    color: #f5a623;
    transform: translateX(5px);
    text-shadow: 0 0 5px #f5a623;
}

.emoji-icon {
    font-size: 16px;
}

/* Online Status Background */
.online-status {
    display: inline-block;
    padding: 2px 8px;
    background-color: #e0f7fa;
    border-radius: 10px;
    color: #00796b;
    font-weight: 600;
    animation: pulse 1.5s infinite;
}

body.dark-mode .online-status {
    background-color: #004d40;
    color: #b2dfdb;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Success and Errors */
.success {
    background-color: #2e7d32; /* Merged from provided CSS */
    color: #fff; /* Added for consistency */
    padding: 10px;
    border-radius: 5px;
    text-align: center;
}

body.dark-mode .success {
    background-color: #2e7d32; /* Merged from provided CSS */
    color: #fff; /* Added for consistency */
}

.errors {
    background-color: #d32f2f; /* Merged from provided CSS */
    color: #fff; /* Added for consistency */
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
    text-align: center;
}

body.dark-mode .errors {
    background-color: #d32f2f; /* Merged from provided CSS */
    color: #fff; /* Added for consistency */
}

/* Error Messages */
.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
    text-align: center;
    font-weight: 500;
    transition: background 0.3s ease, color 0.3s ease;
}

body.dark-mode .error-message {
    background: #420d0d;
    color: #ef9a9a;
}

/* Loading State */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
    font-size: 18px;
    color: #666;
    animation: spin 1s linear infinite;
}

body.dark-mode .loading {
    color: #bbb;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.pagination a, .pagination span {
    padding: 8px 12px;
    background: #fff;
    color: #00c4cc;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

body.dark-mode .pagination a, body.dark-mode .pagination span {
    background: #2a2a3e;
    color: #66d9e8;
}

.pagination a:hover {
    background: #f5a623;
    color: #fff;
    transform: translateY(-2px);
}

.pagination .current {
    background: #00c4cc;
    color: #fff;
    font-weight: 600;
}

body.dark-mode .pagination .current {
    background: #66d9e8;
    color: #1e1e2e;
}

/* Responsive Adjustments for Profile */
@media (max-width: 1024px) {
    .profile-frame {
        flex-direction: column;
    }

    .profile-picture-section,
    .profile-middle,
    .profile-right {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 768px) {
    .profile-image {
        width: 120px;
        height: 120px;
    }

    .quick-links a {
        font-size: 14px;
    }

    .user-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pagination a, .pagination span {
        padding: 6px 10px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .profile-image {
        width: 100px;
        height: 100px;
    }

    .action-button {
        padding: 8px 15px;
        font-size: 14px;
    }

    .quick-links a {
        font-size: 12px;
    }

    .user-grid {
        grid-template-columns: 1fr;
    }

    .pagination a, .pagination span {
        padding: 5px 8px;
        font-size: 12px;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
    }

    .news-feed, .sidebar {
        width: 100%;
    }

    .header-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .search-input {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 10px;
    }

    .post-pic-container, .post-pic, .post-placeholder {
        width: 50px;
        height: 50px;
    }

    .header-profile-pic, .profile-placeholder {
        width: 40px;
        height: 40px;
    }

    .online-pic-container, .online-user-pic, .profile-placeholder {
        width: 80px;
        height: 80px;
    }

    .user-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .news-item h4 {
        font-size: 14px;
    }

    .news-item p {
        font-size: 12px;
    }

    .load-more-button {
        padding: 10px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .logo h1 a {
        font-size: 24px;
    }

    .welcome-message h2 {
        font-size: 22px;
    }

    .post-box h3, .flytta-in-box h3, .login-box h3, .online-users h3, .birthday-users h3, .svt-news h3 {
        font-size: 18px;
    }

    .search-input {
        font-size: 12px;
    }

    .search-button {
        padding: 8px 15px;
        font-size: 12px;
    }

    .online-pic-container, .online-user-pic, .profile-placeholder {
        width: 60px;
        height: 60px;
    }

    .user-grid {
        grid-template-columns: 1fr;
    }
}

/* Footer */
.footer {
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.1);
    transition: background 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
}

body.dark-mode .footer {
    background: rgba(30, 30, 46, 0.9);
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.3);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.footer-copyright {
    font-size: 14px;
    color: #333;
}

body.dark-mode .footer-copyright {
    color: #e0e0e0;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.footer-link {
    color: #00c4cc;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.3s ease, transform 0.2s ease, text-shadow 0.3s ease;
}

body.dark-mode .footer-link {
    color: #66d9e8;
}

.footer-link:hover {
    color: #f5a623;
    transform: translateY(-2px);
    text-shadow: 0 0 5px #f5a623;
}

.footer-slogan {
    font-size: 14px;
    color: #ff4d4d;
    font-weight: 600;
    text-shadow: 0 0 5px rgba(255, 77, 77, 0.3);
}

body.dark-mode .footer-slogan {
    color: #ff6b6b;
    text-shadow: 0 0 5px rgba(255, 107, 107, 0.3);
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer-links {
        flex-direction: column;
        gap: 10px;
    }

    .footer-copyright, .footer-slogan {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .footer-container {
        padding: 0 10px;
    }

    .footer-link {
        font-size: 12px;
    }
}

/* Latest Visitors */
.latest-visitors {
    margin-top: 15px;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

body.dark-mode .latest-visitors {
    background-color: #2a2a3e;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.latest-visitors h3 {
    font-size: 1.2em;
    margin-bottom: 10px;
    color: #333;
    font-weight: 600;
    text-align: center;
}

body.dark-mode .latest-visitors h3 {
    color: #e0e0e0;
}

.visitor-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 5px;
}

.visitor-card {
    text-align: center;
    padding: 5px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

body.dark-mode .visitor-card {
    background-color: #2a2a3e;
    border-color: #444;
}

.visitor-card:hover {
    transform: scale(1.05);
}

.visitor-pic-frame,
.visitor-placeholder-frame {
    display: inline-block;
    width: 60px;
    height: 60px;
    border-radius: 5px;
    overflow: hidden;
    border: 2px solid #ddd;
    margin: 0 auto;
}

body.dark-mode .visitor-pic-frame,
body.dark-mode .visitor-placeholder-frame {
    border-color: #666;
}

.visitor-pic {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.3s ease;
}

.visitor-pic:hover {
    filter: brightness(1.2);
}

.visitor-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background-color: #e0e0e0;
    font-size: 1.5em;
    color: #666;
}

body.dark-mode .visitor-placeholder {
    background-color: #1e1e2e;
    color: #ccc;
}

.username-link {
    display: block;
    text-align: center;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}

body.dark-mode .username-link {
    color: #66d9e8;
}

.username-link:hover {
    text-decoration: underline;
    color: #f5a623;
}

/* Responsive adjustments for Latest Visitors */
@media (max-width: 768px) {
    .visitor-grid {
        grid-template-columns: 1fr;
    }

    .visitor-card {
        margin-bottom: 10px;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-muted {
    color: #666;
}

body.dark-mode .text-muted {
    color: #999;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #00c4cc;
    color: #fff;
}

body.dark-mode .btn-primary {
    color: #66d9e8;
}

.btn-primary:hover {
    background: #009ba1;
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 196, 204, 0.5);
}

.btn-warning {
    background: #f5a623;
    color: #fff;
}

.btn-warning:hover {
    background: #e6951a;
    transform: scale(1.05);
    box-shadow: 0 0 15px #f5a623;
}

.btn-danger {
    background: #ff4d4d;
    color: #fff;
}

body.dark-mode .btn-danger {
    color: #ff6b6b;
}

.btn-danger:hover {
    background: #e60000;
    transform: scale(1.05);
    box-shadow: 0 0 15px #ff4d4d;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #fff;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
    position: relative;
    animation: slideDown 0.3s ease-out;
}

body.dark-mode .modal-content {
    background: #2a2a3e;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
}

body.dark-mode .close-modal {
    color: #e0e0e0;
}

.close-modal:hover {
    color: #ff4d4d;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

body.dark-mode ::-webkit-scrollbar-track {
    background: #1e1e2e;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

body.dark-mode ::-webkit-scrollbar-thumb {
    background: #555;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

body.dark-mode ::-webkit-scrollbar-thumb:hover {
    background: #777;
}

/* Nordic Border Style */
.nordic-border {
    border: 2px solid #d4a017;
    border-radius: 10px;
    padding: 20px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

body.dark-mode .nordic-border {
    border-color: #d4a017;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Registration Form Styles */
.register-form {
    max-width: 500px;
    margin: 0 auto;
    padding: 15px;
    background: rgba(59, 75, 92, 0.9);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

body.dark-mode .register-form {
    background: rgba(30, 30, 46, 0.9);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.register-form label {
    display: block;
    margin: 10px 0 5px;
    color: #e4e4e4;
}

.register-form input,
.register-form select {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    box-sizing: border-box;
    border: 1px solid #d4a017;
    border-radius: 5px;
    background: #e4e4e4;
    transition: border-color 0.3s ease, background 0.3s ease;
}

body.dark-mode .register-form input,
body.dark-mode .register-form select {
    background: #2a2a3e;
    border-color: #d4a017;
    color: #e0e0e0;
}

.register-form input:focus,
.register-form select:focus {
    outline: none;
    border-color: #b58900;
    box-shadow: 0 0 5px rgba(212, 160, 23, 0.5);
}

.register-form button {
    width: 100%;
    padding: 12px;
    background: #d4a017;
    color: #1a2b3c;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    transition: background 0.3s ease, transform 0.2s ease;
}

.register-form button:hover {
    background: #b58900;
    transform: scale(1.05);
}

.errors p {
    margin: 5px 0;
}

/* Ensure existing error styles are applied */
.error {
    color: #d32f2f;
}

body.dark-mode .error {
    color: #ef9a9a;
}