* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(180deg, #1a1a2e, #16162a);
    color: #f5f5f5;
    min-height: 100vh;
    padding: 40px 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    font-size: 2.5rem;
    color: #f5f5f5;
    margin-bottom: 10px;
}

header p {
    color: #888;
    font-size: 1.1rem;
}

.form {
    max-width: 600px;
    margin: 0 auto 40px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form input {
    padding: 15px 20px;
    border: 2px solid #333;
    border-radius: 10px;
    background: #252540;
    color: #f5f5f5;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form input:focus {
    outline: none;
    border-color: #e6a756;
}

.form input::placeholder {
    color: #666;
}

.form-buttons {
    display: flex;
    gap: 10px;
}

.form button {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

#submitBtn {
    background: linear-gradient(135deg, #e6a756, #d4903c);
    color: #1a1a2e;
    flex: 1;
}

#submitBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(230, 167, 86, 0.3);
}

.cancel-btn {
    background: #333;
    color: #f5f5f5;
}

.cancel-btn:hover {
    background: #444;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.gallery-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #252540;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(230, 167, 86, 0.15);
}

.gallery-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s;
}

.gallery-card:hover img {
    transform: scale(1.05);
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-card:hover .card-overlay {
    opacity: 1;
}

.card-overlay button {
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.edit-btn {
    background: #444;
    color: #f5f5f5;
}

.edit-btn:hover {
    background: #e6a756;
    color: #1a1a2e;
}

.delete-btn {
    background: #444;
    color: #f5f5f5;
}

.delete-btn:hover {
    background: #e74c3c;
}

.stats {
    text-align: center;
    margin-top: 40px;
    color: #888;
}

.stats span {
    color: #e6a756;
    font-weight: 600;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state h2 {
    color: #888;
    margin-bottom: 10px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 20, 0.95);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 3rem;
    color: #f5f5f5;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #e6a756;
}

@media (max-width: 600px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .form-buttons {
        flex-direction: column;
    }
}
