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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* HEADER */
.site-header {
    background-color: #9370DB;
    height: 10vh;
    min-height: 60px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 2rem;
    gap: 3rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
    white-space: nowrap;
}

.main-nav {
    display: flex;
    justify-content: center;
    flex: 1;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: opacity 0.3s, transform 0.2s;
}

.nav-link:hover {
    opacity: 0.85;
    transform: translateY(-2px);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: white;
    border-radius: 2px;
}

/* MAIN */
.site-main {
    flex: 1;
    background: linear-gradient(135deg, #DDA0DD 0%, #BA55D3 50%, #DDA0DD 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 75vh;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.app-container {
    min-height: 75vh;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.app-container.fade-out {
    opacity: 0;
}

/* LOADER */
.loader {
    text-align: center;
    padding: 4rem;
    color: white;
    font-size: 1.2rem;
}

/* CONTAINER */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* HERO */
.page-hero {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 2rem;
}

.page-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    font-style: italic;
    font-weight: 300;
    letter-spacing: 1px;
}

.hero-subtitle {
    font-size: 1.4rem;
    margin-bottom: 3rem;
    opacity: 0.95;
    font-style: italic;
    font-weight: 300;
    letter-spacing: 0.5px;
}

/* PHOTO FAN */
.photo-fan {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    margin-top: 3rem;
}

.fan-photo {
    width: 240px;
    height: 300px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #FFD89B, #FFA751);
}

.fan-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.fan-left {
    transform: rotate(-8deg) translateX(25px);
    z-index: 1;
}

.fan-center {
    transform: rotate(0deg) scale(1.1);
    z-index: 3;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.fan-right {
    transform: rotate(8deg) translateX(-25px);
    z-index: 1;
}

/* BUTTONS */
.btn {
    display: inline-block;
    padding: 0.9rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary {
    background: white;
    color: #9370DB;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* SECTIONS */
.page-section {
    padding: 2rem 0;
}

.page-section h1,
.page-section h2 {
    color: white;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-section h2 {
    font-size: 2rem;
}

/* FEATURES GRID (home) */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: #9370DB;
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
}

.feature-card p {
    color: #555;
}

/* PORTFOLIO */
.portfolio-intro {
    text-align: center;
    color: white;
    font-size: 1.2rem;
    margin-bottom: 3rem;
    opacity: 0.95;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.portfolio-item {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: linear-gradient(135deg, #DDA0DD, #BA55D3);
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.portfolio-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

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

/* LIGHTBOX */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    cursor: zoom-out;
}

.lightbox.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    background: none;
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.2s, opacity 0.2s;
    z-index: 2001;
}

.lightbox-close:hover {
    transform: scale(1.2);
    opacity: 0.8;
}

/* Адаптивность */
@media (max-width: 968px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .lightbox-img {
        max-width: 95%;
        max-height: 85vh;
    }

    .lightbox-close {
        top: 1rem;
        right: 1rem;
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}

/* CONTACTS */
.contacts-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.contacts-info h2,
.contacts-form h2 {
    color: #9370DB;
    text-align: left;
    text-shadow: none;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: flex-start;
}

.contact-icon {
    font-size: 1.5rem;
}

.contact-item strong {
    display: block;
    color: #9370DB;
    margin-bottom: 0.2rem;
}

.contact-item p {
    color: #555;
}

/* FORM */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    color: #9370DB;
    font-weight: 500;
    margin-bottom: 0.3rem;
}

.form-group input,
.form-group textarea {
    padding: 0.7rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

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

.form-status {
    padding: 0.8rem;
    border-radius: 6px;
    text-align: center;
    display: none;
}

.form-status.success {
    display: block;
    background: #d4edda;
    color: #155724;
}

.form-status.error {
    display: block;
    background: #f8d7da;
    color: #721c24;
}

/* ABOUT */
.about-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.photo-placeholder {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, #DDA0DD, #BA55D3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
}

.about-text h2 {
    color: #9370DB;
    text-align: left;
    text-shadow: none;
    margin-bottom: 1rem;
}

.about-text p {
    color: #555;
    margin-bottom: 1rem;
    line-height: 1.8;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #BA55D3;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

/* FOOTER */
.site-footer {
    background-color: #9370DB;
    height: 15vh;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.footer-content {
    text-align: center;
}

/* Адаптивность */
@media (max-width: 968px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        justify-content: center;
        padding: 1rem;
        gap: 0.8rem;
    }

    .site-header {
        height: auto;
        min-height: 10vh;
    }

    .main-nav ul {
        gap: 1.2rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-link {
        font-size: 1rem;
    }

    .page-hero h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .page-section h1 {
        font-size: 2rem;
    }

    .page-section h2 {
        font-size: 1.5rem;
    }

    .container {
        padding: 2rem 1rem;
    }

    .photo-fan {
        flex-direction: row;
        gap: 0.5rem;
    }
    
    .fan-photo {
        width: 140px;
        height: 175px;
    }
    
    .fan-left {
        transform: rotate(-6deg) translateX(15px);
    }
    
    .fan-right {
        transform: rotate(6deg) translateX(-15px);
    }
    
    .fan-center {
        transform: scale(1.05);
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .contacts-layout,
    .about-layout {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }

    .about-layout {
        text-align: center;
    }

    .about-text h2 {
        text-align: center;
    }

    .photo-placeholder {
        max-width: 250px;
        margin: 0 auto;
    }

    .about-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .site-footer {
        height: auto;
        min-height: 15vh;
        padding: 1.5rem 1rem;
    }
}

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

    .main-nav ul {
        gap: 0.8rem;
    }

    .nav-link {
        font-size: 0.9rem;
    }
    
    .fan-photo {
        width: 100px;
        height: 125px;
    }
    
    .fan-left {
        transform: rotate(-5deg) translateX(10px);
    }
    
    .fan-right {
        transform: rotate(5deg) translateX(-10px);
    }
}