main {
    padding: 20px;
}

h1 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 20px;
}

h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

p {
    font-size: 16px;
    color: black !important;
}

img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 10px;
    margin: 10px 0;
}

video {
    max-width: 100%;
    max-height: 300px;
    border-radius: 10px;
    margin: 10px 0;
}

/* Profile Section */
.profile-section {
    background-color: #F7F3F0;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.profile-section button {
    padding: 10px 20px;
    background-color: var(--dl-color-theme-primary1);
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
}

.profile-section button:hover {
    background-color: #e02e4f;
}

/* Edit Profile Form */
.edit-profile-form {
    display: none;
    background-color: #F7F3F0;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

.edit-profile-form textarea,
.edit-profile-form input[type="text"],
.edit-profile-form input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    margin-bottom: 10px;
}

.edit-profile-form button[type="submit"] {
    background-color: var(--dl-color-theme-primary1);
    color: #fff;
}

.edit-profile-form button[type="submit"]:hover {
    background-color: #e02e4f;
}

.edit-profile-form button[type="button"] {
    background-color: #F7F3F0;
    color: #000;
}

.edit-profile-form button[type="button"]:hover {
    background-color: #e0e0e0;
}

/* Contest Section */
.contest {
    background-color: #EADADA;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.5s ease;
    color: #333;
    font-weight: bold;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.contest::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(0deg, transparent, transparent 40%, rgba(0, 255, 255, 0.3));
    transform: rotate(-45deg);
    transition: all 0.5s ease;
    opacity: 0;
}

.contest:hover {
    transform: scale(1.06);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
    background-color: #F0E0E0;
}

.contest:hover::before {
    opacity: 1;
    transform: rotate(-45deg) translateY(100%);
}

.contest h2,
.contest p {
    position: relative;
    z-index: 2;
    color: #222;
}

.contest h4 {
    font-size: 20px;
    margin-bottom: 10px;
}

.contest-details p {
    margin: 5px 0;
    color: black;
}

/* User Info Section */
.user-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.user-info img {
    width: 250px !important;
    height: 200px !important;
    border-radius: 60% !important;
    object-fit: cover;
}

.user-info .details {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.user-info .details h2 {
    margin: 0;
    font-size: 24px;
}

.user-info .details p {
    margin: 10px 0;
    font-size: 16px;
    color: black;
}

.user-info .stats {
    display: flex;
    gap: 40px;
}

/* Grid Layout for User Posts */
.user-posts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    justify-content: center;
}

/* Standardized Post Item */
.post-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    max-width: 300px;
    min-height: 420px; /* Adjust as needed for your content */
    padding: 15px;
    background: #EADADA; /* Updated: Softer dark blue-gray for better contrast */
    color: black;
    border-radius: 10px;
    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    margin: 0 auto 20px;
    position: relative; /* For absolute positioning of SVG */
}

.post-item:hover {
    transform: scale(0.95);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Ensure post-content takes available space, pushing like button down */
.post-content {
    flex: 1 1 auto;
    width: 100%;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Post Media */
.post-media {
    width: 100%;
    height: 225px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.post-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.post-video {
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

/* Like button always at the bottom, centered */
.like-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    margin-top: 10px;
    margin-bottom: 5px;
}

/* Like Button */
.like-button {
    padding: 8px 12px;
    font-size: 14px;
    border: none;
    border-radius: 5px;
    background-color: #ddd;
    color: #333;
    cursor: pointer;
    transition: background-color 0.3s ease-in-out, transform 0.1s ease-in-out;
}

.like-button:hover {
    background-color: rgb(208, 90, 110);
    color: white;
}

.like-button.liked {
    background-color: rgb(208, 90, 110);
    color: white;
    font-weight: bold;
    transform: scale(1.05);
}

.like-button:active {
    transform: scale(0.95);
}

/* SVG Options Menu in Right Corner */
.options-menu {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
}

.options-menu svg {
    width: 24px;
    height: 24px;
    fill: #FFF; /* White for visibility against background */
    transition: fill 0.3s ease;
}

.options-menu:hover svg {
    fill: #e02e4f; /* Matches hover color theme */
}

/* Dropdown Menu (Optional) */
.menu-dropdown {
    display: none;
    position: absolute;
    top: 35px;
    right: 0;
    background: #444;
    border-radius: 8px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    padding: 5px;
    min-width: 100px;
    z-index: 1000;
}

.menu-dropdown button {
    display: block;
    width: 100%;
    border: none;
    background: none;
    padding: 8px;
    text-align: left;
    font-size: 14px;
    color: #FFF;
    cursor: pointer;
}

.menu-dropdown button:hover {
    background: #666;
}

/* Cropping Preview */
#imagePreview {
    text-align: center;
    margin-top: 10px;
}

#cropImageBtn,
#resetCropBtn {
    padding: 8px 16px;
    margin: 5px;
    background-color: var(--dl-color-theme-primary1);
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#cropImageBtn:hover,
#resetCropBtn:hover {
    background-color: #e02e4f;
}

/* Tablet View */
@media (max-width: 768px) {
    h1 {
        font-size: 30px;
    }

    .user-info {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .user-info img {
        width: 150px !important;
        height: 120px !important;
    }

    .user-info .stats {
        gap: 20px;
    }

    .user-posts {
        grid-template-columns: 1fr;
    }

    .post-item {
        max-width: 300px;
    }

    .post-media {
        height: 200px;
    }
}

/* Mobile View */
@media (max-width: 480px) {
    h1 {
        font-size: 24px;
    }

    .user-info img {
        width: 100px !important;
        height: 80px !important;
    }

    .user-info .details h2 {
        font-size: 20px;
    }

    .user-info .details p {
        font-size: 14px;
    }

    .user-info .stats {
        gap: 15px;
    }

    .user-info .stats p {
        font-size: 14px;
    }

    .post-item {
        max-width: 100%;
        padding: 10px;
    }

    .post-media {
        height: 180px;
    }

    .post-content p {
        font-size: 12px;
    }

    .post-content small {
        font-size: 10px;
    }

    .like-button {
        padding: 6px 10px;
        font-size: 12px;
    }
}