body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #fafafa;
    color: #333;
    margin: 0;
    padding: 0;
}

.content-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}



.profile-header {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 20px;
}

.avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ddd;
    background: #eee;
}

.profile-info {
    flex: 1;
}

.profile-info h2 {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 600;
}

.profile-stats {
    display: flex;
    gap: 25px;
    margin: 10px 0;
    font-size: 15px;
}

.profile-stats span {
    font-weight: 600;
}

.profile-bio {
    margin-top: 10px;
    font-size: 15px;
    color: #555;
}

.profile-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.profile-actions a,
.profile-actions button {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    border: 1px solid #ccc;
    background: white;
    cursor: pointer;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
}

.profile-actions a:hover,
.profile-actions button:hover {
    background: #f0f0f0;
}


.search-form {
    margin: 20px 0;
    display: flex;
    gap: 10px;
}

.search-form input {
    flex: 1;
    padding: 10px;
    border-radius: 25px;
    border: 1px solid #ccc;
    outline: none;
}

.search-form button {
    padding: 10px 18px;
    border-radius: 25px;
    border: none;
    background: #1877f2;
    color: white;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-form button:hover {
    background: #145db2;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    margin-top: 20px;
}

.post-preview {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: #eee;
    cursor: pointer;
}

.post-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.post-preview:hover img {
    transform: scale(1.05);
}



.sidebar:hover {
    width: 200px;
}

.sidebar a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    text-decoration: none;
    font-size: 15px;
    color: #ecf0f1;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.sidebar a:hover {
    background-color: #34495e;
}

.sidebar .link-text {
    opacity: 0;
    visibility: hidden;
    margin-left: 10px;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar:hover .link-text {
    opacity: 1;
    visibility: visible;
}
 .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 70px;
    background-color: #2c3e50;
    overflow-x: hidden;
    transition: width 0.3s ease;
    padding-top: 20px;
    z-index: 1000;
}

.sidebar:hover {
    width: 200px;
}


.sidebar a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    text-decoration: none;
    font-size: 15px;
    color: #ecf0f1;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.sidebar a:hover {
    background-color: #34495e;
}

.sidebar .link-text {
    opacity: 0;
    visibility: hidden;
    margin-left: 10px;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar:hover .link-text {
    opacity: 1;
    visibility: visible;
}
.create-btn {
    display: inline-block;
    padding: 12px 20px;
    background-color: #1877f2;
    color: white;
    font-size: 16px;
    border-radius: 30px;
    text-decoration: none;
    text-align: center;
}
.create-btn:hover {
    background-color: #145db2;
}
.edit-btn {
    display: inline-block;
    padding: 12px 20px;
    background-color: #1877f2;
    color: white;
    font-size: 16px;
    border-radius: 30px;
    text-decoration: none;
    text-align: center;
}

.edit-btn:hover {
    background-color: #145db2;
}
.sidebar i {
    font-size: 18px;
    min-width: 30px;
    text-align: center;
}


.post-item {
    background-color: #fff;
    border: 1px solid #e6e6e6;
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 12px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
}

.post-item:hover {
    transform: translateY(-3px);
}


.author,
.date {
    font-size: 14px;
    color: #777;
    margin: 5px 0;
}

.author-link {
    color: #1877f2;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.author-link:hover {
    color: #145db2;
    text-decoration: underline;
}

.description {
    margin: 15px 0;
    font-size: 16px;
    line-height: 1.5;
    color: #333;
}


.post-slider {
    position: relative;
    width: 100%;
    height: auto;
    margin-top: 15px;
    overflow: hidden;
    border-radius: 10px;
    border: 1px solid #ddd;
    background: #fafafa;
}

.post-slider .slides {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
}

.post-slider .slide {
    flex: 0 0 100%;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
}

.post-slider .slide img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    overflow: hidden;
    height: auto;
}


.post-slider .prev,
.post-slider .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 50%;
    font-size: 20px;
    transition: background 0.3s ease;
    opacity: 0;
    visibility: hidden;
}


.post-slider:hover .prev,
.post-slider:hover .next {
    opacity: 1;
    visibility: visible;
}

.post-slider .prev { left: 10px; }
.post-slider .next { right: 10px; }

.post-slider .prev:hover,
.post-slider .next:hover {
    background: rgba(0,0,0,0.8);
}


.reaction-form {
    margin-top: 10px;
}

.reaction-form button {
    background-color: #1877f2;
    border: none;
    color: white;
    padding: 8px 16px;
    font-size: 14px;
    margin: 3px;
    cursor: pointer;
    border-radius: 20px;
    transition: background-color 0.3s ease;
}

.reaction-form button:hover {
    background-color: #145db2;
}


.reaction-count {
    margin: 10px 0;
    font-size: 14px;
    color: #555;
}


.comment-form {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

.comment-form input {
    flex: 1;
    padding: 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 20px;
    outline: none;
    transition: border 0.2s ease;
}

.comment-form input:focus {
    border-color: #1877f2;
}

.comment-form button {
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    background-color: #1877f2;
    color: white;
    border: none;
    border-radius: 20px;
    transition: background-color 0.3s ease;
}

.comment-form button:hover {
    background-color: #145db2;
}
.sidebar:hover {
    width: 200px;
}

.sidebar a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    text-decoration: none;
    font-size: 15px;
    color: #ecf0f1;
    white-space: nowrap;
    transition: background 0.2s ease;
}
.sidebar a:hover {
    background-color: #34495e;
}
.delete-button {
    background-color: #e63946;
    color: white;
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: 15px;
}

.delete-button:hover {
    background-color: #d62828;
    transform: translateY(-2px);
}

.delete-button:active {
    background-color: #b71c1c;
    transform: translateY(1px);
}

.delete-button::before {
    content: "⚠ ";
}
.sidebar i {
    font-size: 18px;
    min-width: 30px;
    text-align: center;
}

.sidebar .link-text {
    opacity: 0;
    visibility: hidden;
    margin-left: 10px;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar:hover .link-text {
    opacity: 1;
    visibility: visible;
}

.auth-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
}

.site-title {
    font-size: 36px;
    font-weight: bold;
    color: #1877f2;
    margin-bottom: 30px;
}

.login-box {
    background: #fff;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-box h2 {
    margin-bottom: 20px;
    text-align: center;
    font-size: 22px;
    font-weight: 600;
}

.login-box input {
    width: 100%;
    padding: 12px;
    margin: 10px 0 20px 0;
    border: 1px solid #ccc;
    border-radius: 25px;
    outline: none;
    transition: border 0.3s ease;
}

.login-box input:focus {
    border-color: #1877f2;
}

.register-link {
    text-align: center;
    margin-top: 15px;
}

.register-link .alt-btn {
    display: block;
    width: 95%;
    padding: 12px;
    background-color: #42b72a;
    color: white;
    font-size: 16px;
    font-weight: bold;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-decoration: none;
}

.register-link .alt-btn:hover {
    background-color: #36a420;
    transform: translateY(-2px);
}

.login-btn {
    width: 100%;
    padding: 12px;
    background-color: #1877f2;
    color: white;
    font-size: 16px;
    font-weight: bold;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.login-btn:hover {
    background-color: #145db2;
    transform: translateY(-2px);
}

.login-btn:active {
    background-color: #0e4fa3;
    transform: translateY(1px);
}

.extra-link {
    text-align: center;
    margin-top: 15px;
}

.extra-link a {
    color: #1877f2;
    text-decoration: none;
    font-size: 14px;
}

.extra-link a:hover {
    text-decoration: underline;
}

.login-box label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
}

.register-box input[type="text"],
.register-box input[type="email"],
.register-box input[type="password"],
.register-box input[type="file"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 25px;
    outline: none;
    transition: border 0.3s ease;
}

.register-box input:focus {
    border-color: #1877f2;
}

.register-box {
    background: #fff;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.register-box h2 {
    margin-bottom: 20px;
    text-align: center;
    font-size: 22px;
    font-weight: 600;
}

.register-box label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
}

.register-box input[type="text"],
.register-box input[type="email"],
.register-box input[type="password"],
.register-box input[type="file"],
.register-box textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 25px;
    outline: none;
    transition: border 0.3s ease;
}

.register-box input:focus,
.register-box textarea:focus {
    border-color: #1877f2;
}


.login-btn:hover {
    background-color: #145db2;
    transform: translateY(-2px);
}

.register-box textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 12px;
    resize: vertical;
    margin-bottom: 20px;
    font-size: 14px;
}

.tags {
    margin: 15px 0;
}

.tag {
    display: inline-block;
    background: #eef3ff;
    color: #1877f2;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 20px;
    margin: 4px 5px 0 0;
}

.comments p {
    background: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 10px;
    font-size: 14px;
}

.comment-form input {
    flex: 1;
    padding: 10px;
    border-radius: 25px;
    border: 1px solid #ccc;
    outline: none;
    margin-right: 10px;
}

.comment-form button {
    padding: 10px 18px;
    border-radius: 25px;
    border: none;
    background: #1877f2;
    color: white;
    cursor: pointer;
    transition: background 0.3s ease;
}

.comment-form button:hover {
    background: #145db2;
}

.search-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.search-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
    color: #333;
}

.user-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.user-card {
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 12px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: 280px;
    padding: 20px;
    text-align: center;
    transition: transform 0.2s ease;
}

.user-card:hover {
    transform: translateY(-5px);
}

.user-avatar img {
    border-radius: 50%;
    object-fit: cover;
    width: 150px;
    height: 150px;
}

.user-info {
    margin-top: 15px;
}

.user-info p {
    margin: 10px 0;
    font-size: 14px;
    color: #555;
}

.follow-btn {
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: background 0.3s ease;
    margin-top: 10px;
}

.follow-btn.follow {
    background-color: #1877f2;
    color: white;
}

.follow-btn.follow:hover {
    background-color: #145db2;
}

.follow-btn.unfollow {
    background-color: #e63946;
    color: white;
}

.follow-btn.unfollow:hover {
    background-color: #d62828;
}




.login-box form label {
    display: block;
    margin: 8px 0 6px;
    font-weight: 600;
    color: #333;
}

.login-box input[type="email"],
.login-box input[type="password"],
.login-box input {
    width: 100%;
    padding: 12px;
    margin-bottom: 14px;
    border: 1px solid #ddd;
    border-radius: 10px;
    outline: none;
    box-sizing: border-box;
}

.login-box .login-btn {
    display: block;
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: none;
    background: #1877f2;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
}

.login-box .login-btn:hover {
    background: #145db2;
}

.post-item {
    max-width: 700px;
    margin: 20px auto;
    padding: 24px;
}

.extra-link a {
    color: #1877f2;
    text-decoration: none;
}

.extra-link a:hover {
    text-decoration: underline;
}
