* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    padding: 20px;
}

form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
}

input, textarea, select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border 0.3s ease;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

button {
    background: #3498db;
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 10px;
}

button:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

h1 {
    font-size: 28px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    color: #2c3e50;
}

.listing {
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
    background: white;
}

.listing:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.listing h3 {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
}

.listing img {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    margin: 15px 0;
    object-fit: cover;
    object-position: center;
}

.listing p {
    margin: 10px 0;
    color: #555;
}

.listing .like-btn {
    background: none;
    border: none;
    color: #e74c3c;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    margin-top: 10px;
}

.listing .like-btn:hover {
    transform: scale(1.1);
}

.listing .like-count {
    font-size: 16px;
    margin-left: 5px;
}

.listing .edit-btn,
.listing .delete-btn {
    padding: 8px 12px;
    margin-right: 10px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.listing .edit-btn {
    background: #3498db;
    color: white;
    border: none;
}

.listing .delete-btn {
    background: #e74c3c;
    color: white;
    border: none;
}

.listing .edit-btn:hover,
.listing .delete-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
    display: none;
}

.alert-error {
    background-color: #ffeef0;
    border: 1px solid #fad2d7;
    color: #e74c3c;
}

.alert-success {
    background-color: #f0fff4;
    border: 1px solid #c6f6d5;
    color: #27ae60;
}

.header {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 25px;
}

.header-btn {
    padding: 10px 16px;
    background: #ecf0f1;
    color: #2c3e50;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.header-btn:hover {
    background: #bdc3c7;
}

.filters {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.filters label {
    font-weight: 500;
}

.filters select {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #ddd;
}

#applyFilters {
    padding: 8px 16px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

#applyFilters:hover {
    background: #2980b9;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.page-btn {
    padding: 8px 16px;
    background: #ecf0f1;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.page-btn:hover {
    background: #bdc3c7;
}

.page-btn.active {
    background: #3498db;
    color: white;
}

.author-link {
    color: #3498db;
    text-decoration: none;
}

.author-link:hover {
    text-decoration: underline;
}

#filterInfo {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

#clearAuthorFilter {
    padding: 5px 10px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

#clearAuthorFilter:hover {
    background: #c0392b;
}