/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
    position: relative;
    min-height: 100vh;
    padding-bottom: 120px;
    background-color: #f9f9f9;
}

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

/* Шапка */
header {
    background: linear-gradient(135deg, #e6abad 0%, #fed9d3 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 2.2rem;
    font-weight: 300;
}

.logo span {
    font-weight: 600;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background 0.3s;
}

nav ul li a:hover,
nav ul li a.active {
    background: rgba(255, 255, 255, 0.2);
}

/* Главный контент */
main {
    padding: 40px 0;
    min-height: calc(100vh - 200px);
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* Главная страница */
.hero {
    text-align: center;
    padding: 60px 0;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #333;
}

.hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 30px;
    color: #666;
    line-height: 1.6;
}

.about {
    display: flex;
    align-items: center;
    gap: 50px;
    margin-top: 40px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.about-img {
    flex: 1;
    min-width: 300px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.about-img img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s;
}

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

.about-text {
    flex: 1;
    min-width: 300px;
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #333;
}

.about-text p {
    margin-bottom: 15px;
    color: #666;
    line-height: 1.6;
}

/* Галерея */
.gallery-header {
    text-align: center;
    margin-bottom: 40px;
}

.gallery-header h2 {
    font-size: 2.2rem;
    color: #333;
    margin-bottom: 10px;
}

.gallery-header p {
    color: #666;
    font-size: 1.1rem;
}

.artworks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.artwork {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.artwork:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.artwork-img {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.artwork-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
    cursor: pointer;
}

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

.artwork-info {
    padding: 20px;
}

.artwork-info h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #333;
}

.artwork-info p {
    color: #666;
    line-height: 1.5;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.modal-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 5px;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
}

.close-modal {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
}

.close-modal:hover {
    color: #fed9d3;
}

/* Контакты */
.contact-header {
    text-align: center;
    margin-bottom: 40px;
}

.contact-header h2 {
    font-size: 2.2rem;
    color: #333;
    margin-bottom: 10px;
}

.contact-header p {
    color: #666;
    font-size: 1.1rem;
}

.contact-content {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.contact-info {
    flex: 1;
    min-width: 300px;
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #333;
}

.contact-info p {
    margin-bottom: 10px;
    color: #666;
    line-height: 1.6;
}

.social-links {
    margin-top: 20px;
}

.social-links h3 {
    margin-bottom: 10px;
}

.social-links a {
    display: inline-block;
    margin-right: 15px;
    color: #e6abad;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.social-links a:hover {
    color: #ff69b4;
    text-decoration: underline;
}

.contact-form {
    flex: 1;
    min-width: 300px;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.contact-form h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #e6abad;
}

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

.submit-btn {
    background: linear-gradient(135deg, #e6abad 0%, #fed9d3 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: opacity 0.3s, transform 0.2s;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.3);
}

.submit-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Админ-панель */
.admin-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.admin-section h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #333;
}

.hidden {
    display: none !important;
}

.admin-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    color: #666;
    font-weight: 500;
    transition: color 0.3s;
}

.tab-btn:hover {
    color: #333;
}

.tab-btn.active {
    color: #e6abad;
    border-bottom: 2px solid #e6abad;
}

.tab-content {
    padding: 20px 0;
}

.tab-content h3 {
    margin-bottom: 15px;
    color: #333;
}

.tab-content h4 {
    margin-bottom: 10px;
    color: #555;
}

.art-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.art-item {
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    background: white;
    transition: transform 0.3s;
}

.art-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.art-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.art-info {
    padding: 15px;
}

.art-info h4 {
    margin-bottom: 5px;
    color: #333;
}

.art-info p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.delete-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
    width: 100%;
    transition: background-color 0.3s;
}

.delete-btn:hover {
    background-color: #c0392b;
}

.logout-btn {
    background-color: #7f8c8d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 20px;
    transition: background-color 0.3s;
}

.logout-btn:hover {
    background-color: #6c7b7d;
}

/* Кнопки редактирования на главной странице */
.edit-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
    width: 100%;
    transition: background-color 0.3s;
}

.edit-btn:hover {
    background-color: #2980b9;
}

/* Стили для формы редактирования */
.edit-form {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-top: 10px;
    border: 1px solid #ddd;
}

.edit-form .form-group {
    margin-bottom: 10px;
}

.edit-form input,
.edit-form textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

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

.save-btn {
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    flex: 1;
    transition: background-color 0.3s;
}

.save-btn:hover {
    background-color: #219653;
}

.cancel-btn {
    background-color: #95a5a6;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    flex: 1;
    transition: background-color 0.3s;
}

.cancel-btn:hover {
    background-color: #7f8c8d;
}

/* Стили для текущего изображения в админ-панели */
.current-image {
    max-width: 200px;
    border-radius: 5px;
    margin-top: 10px;
    display: block;
    border: 1px solid #ddd;
}

.note {
    margin-top: 15px;
    color: #666;
    font-size: 0.9rem;
    font-style: italic;
}

/* Подвал */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #333;
    color: white;
    padding: 20px 0;
    text-align: center;
    z-index: 100;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.copyright {
    flex: 1;
    text-align: left;
    min-width: 200px;
}

.developer {
    flex: 1;
    text-align: right;
    min-width: 200px;
}

.developer a {
    color: #e6abad;
    text-decoration: none;
    transition: color 0.3s;
}

.developer a:hover {
    color: #fed9d3;
    text-decoration: underline;
}

/* Адаптивность */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    nav ul {
        margin-top: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }

    nav ul li {
        margin: 5px 10px;
    }

    .about {
        flex-direction: column;
    }

    .contact-content {
        flex-direction: column;
    }

    .artworks-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .footer-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .copyright,
    .developer {
        text-align: center;
        width: 100%;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.8rem;
    }

    .hero h2 {
        font-size: 1.8rem;
    }

    .gallery-header h2,
    .contact-header h2 {
        font-size: 1.8rem;
    }

    .artworks-grid {
        grid-template-columns: 1fr;
    }

    .admin-section {
        padding: 20px;
    }
}