:root {
    --primary-color: #a2c3db;
    --accent-color: #ff6b6b;
    --bg-dark: #1f1f1f;
    --bg-card: #333333;
    --text-light: #e0e0e0;
    --shadow-soft: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-strong: 0 8px 12px rgba(0,0,0,0.2);
}

main {
    margin-left: 280px;
    width: calc(100% - 280px);
    flex-grow: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
}

.auth-buttons a {
    background-color: #ff6b6b;
    color: #fff;
    padding: 10px;
    text-align: center;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.auth-buttons a:hover {
    background-color: #e05c5c;
}


#chirp-form {
    background-color: #333;
    border-radius: 10px;
    padding: 20px;
    width: 100%;
    max-width: 700px;
    margin-bottom: 20px;
}

#chirp-input {
    width: 100%;
    border: 1px solid #555;
    background-color: #444;
    color: #e0e0e0;
    padding: 10px;
    border-radius: 5px;
    outline: none;
    margin-bottom: 10px;
    resize: none;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    min-height: 100px;
}

#chirp-input::placeholder {
    color: #aaa;
}

#chirp-input:focus {
    border: 1px solid #ff6b6b;
}
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    gap: 10px;
    flex-wrap: wrap;
}

.photo-gif {
    display: flex;
    flex-direction: row;
    gap: 20px;
}

.form-actions button {
    background-color: #444;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
}

.form-actions button:hover {
    background-color: #555;
}

button[type="submit"] {
    background-color: #a2c3db;
    color: #1f1f1f;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 30px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button[type="submit"]:hover {
    background-color: #8db5cf;
}

#image-preview, #gif-preview {
    margin-top: 15px;
    width: 100%;
}

.selected-image, .selected-gif {
    position: relative;
    display: inline-block;
    max-width: 100%;
    margin-top: 10px;
}

.selected-image img, .selected-gif img {
    max-width: 100%;
    border-radius: 10px;
    max-height: 300px;
    object-fit: cover;
}
.selected-image button, .selected-gif button {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 15px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.selected-image button:hover, .selected-gif button:hover {
    background-color: rgba(255, 107, 107, 0.9);
}

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

.modal-content {
    background-color: #333;
    margin: 5% auto;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: #fff;
}
.gif-search {
    margin: 20px 0;
}

.gif-search input {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 5px;
    background-color: #444;
    color: #fff;
    font-size: 16px;
}

.gif-search input:focus {
    outline: 2px solid #a2c3db;
}

#gif-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    padding: 10px;
}

#gif-results img {
    width: 100%;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

#gif-results img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.post {
    background-color: #333333;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
    max-width: 700px;
    cursor: pointer;
    border-left: 4px solid transparent;
    position: relative;
    overflow: hidden;
}

.post.following {
    border-left-color: #98FB98;
    background: linear-gradient(to right, rgba(152, 251, 152, 0.1), #333333);
}

.post.not-following {
    border-left-color: #ff6b6b;
    background: linear-gradient(to right, rgba(255, 107, 107, 0.1), #333333);
}

.post.own-post {
    border-left-color: #ADD8E6;
    background: linear-gradient(to right, rgba(173, 216, 230, 0.1), #333333);
}

.post:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.8);
}

.post-content {
    margin: 10px 0;
    font-size: 18px;
    color: #e6e6e6;
    word-wrap: break-word;
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

.post-image, .post-gif {
    margin: 10px 0;
    max-width: 100%;
    overflow: hidden;
    text-align: center;
    border-radius: 10px;
}

.post-image img, .post-gif img {
    max-height: 400px;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.post-image img:hover {
    transform: scale(1.02);
}

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

.username {
    font-weight: bold;
    color: #a2c3db;
    cursor: pointer;
    transition: color 0.3s;
}

.username:hover {
    color: #ff6b6b;
}

.timestamp {
    color: #aaa;
    font-size: 12px;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.like-button, .reply-count, .share-button {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #ccc;
    transition: color 0.3s;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.like-button:hover, .reply-count:hover, .share-button:hover {
    color: #ff6b6b;
}

.like-button.clicked {
    color: #EC5F5F;
}

.like-count, .reply-count-number {
    color: #888;
    font-size: 14px;
}

.view-post {
    color: #a2c3db;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.view-post:hover {
    color: #ff6b6b;
}

#char-count {
    color: #aaa;
    font-size: 14px;
    text-align: right;
    margin: 5px 0;
}

.tabs {
    display: flex;
    justify-content: space-around;
    background-color: #333;
    padding: 10px 0;
    margin-bottom: 20px;
    border-radius: 10px;
    width: 100%;
    max-width: 700px;
}

.tab {
    color: #a2c3db;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
}
.tab.active {
    background-color: #444;
    color: #fff;
}

.tab:hover {
    background-color: #444;
}

@media only screen and (max-width: 768px) {
    aside {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    main {
        margin-left: 0;
        width: 100%;
    }
    
    .post {
        width: 90%;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    #gif-results {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .selected-image img, 
    .selected-gif img,
    .post-image img, 
    .post-gif img {
        max-height: 250px;
    }
    
    .form-actions {
        justify-content: space-between;
    }
}
