/* ===== Современный дизайн для лендинга тату-мастера ===== */

:root {
    --bg-dark: #0a0a0f;
    --bg-darker: #050508;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --accent-pink: #ff00aa;
    --accent-purple: #7d00ff;
    --accent-cyan: #00d4ff;
    --text-primary: #ffffff;
    --text-secondary: #b8b8c8;
    --text-muted: #6b6b7a;
    --border-color: rgba(255, 0, 170, 0.2);
    --shadow-glow: 0 0 40px rgba(255, 0, 170, 0.3);
    --shadow-glow-purple: 0 0 40px rgba(125, 0, 255, 0.3);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: var(--bg-dark);
    background-image: 
        radial-gradient(at 20% 30%, rgba(255, 0, 170, 0.1) 0px, transparent 50%),
        radial-gradient(at 80% 70%, rgba(125, 0, 255, 0.1) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(0, 212, 255, 0.05) 0px, transparent 50%);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Indie Flower', cursive;
    font-weight: 400;
    letter-spacing: -0.02em;
}

/* ===== Анимированный фон ===== */
.svg-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.08;
    background-image: 
        url("data:image/svg+xml,%3Csvg width='200' height='200' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30,30 Q100,10 170,30 T310,30' stroke='%23ff00aa' fill='none' stroke-width='1.5'/%3E%3Cpath d='M20,100 Q90,80 160,100 T300,100' stroke='%237d00ff' fill='none' stroke-width='1.5'/%3E%3Cpath d='M40,170 Q110,150 180,170 T320,170' stroke='%2300d4ff' fill='none' stroke-width='1.5'/%3E%3Ccircle cx='50' cy='50' r='2' fill='%23ff00aa'/%3E%3Ccircle cx='150' cy='120' r='1.5' fill='%237d00ff'/%3E%3Ccircle cx='250' cy='80' r='2' fill='%2300d4ff'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 300px 300px;
    pointer-events: none;
    animation: backgroundMove 20s ease-in-out infinite;
}

@keyframes backgroundMove {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-20px, -20px) rotate(1deg); }
}

/* ===== Hero Section ===== */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 2rem 0;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 0, 170, 0.1) 0%, transparent 70%);
    animation: pulse 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 400;
    background: linear-gradient(135deg, var(--accent-pink) 0%, var(--accent-purple) 50%, var(--accent-cyan) 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    animation: gradientShift 5s ease infinite, fadeInUp 0.8s ease-out;
    position: relative;
    display: inline-block;
}

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

.hero-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--accent-pink), transparent);
    border-radius: 2px;
    animation: fadeInUp 1s ease-out 0.5s both;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hero-text {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 2rem;
}

/* ===== Современные кнопки ===== */
.btn {
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid transparent;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn span {
    position: relative;
    z-index: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
    color: var(--text-primary);
    border: none;
    box-shadow: 0 10px 30px rgba(255, 0, 170, 0.3);
}

.btn-primary:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 15px 40px rgba(255, 0, 170, 0.5);
    color: var(--text-primary);
}

.btn-outline-primary {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--accent-pink);
    color: var(--accent-pink);
    backdrop-filter: blur(10px);
}

.btn-outline-primary:hover {
    background: var(--accent-pink);
    color: var(--text-primary);
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 15px 40px rgba(255, 0, 170, 0.4);
    border-color: var(--accent-pink);
}

/* ===== Секции ===== */
.about-section,
.portfolio-section,
.ai-section,
.contact-section {
    padding: 8rem 0;
    position: relative;
    scroll-margin-top: 80px; /* Отступ для якорных ссылок */
}

.section-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4rem;
    text-align: center;
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-pink), transparent);
    border-radius: 2px;
}

.about-content {
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    color: var(--text-secondary);
    line-height: 2;
    max-width: 900px;
    margin: 0 auto;
}

.about-content p {
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
    transition: transform 0.3s ease;
}

.about-content p:hover {
    transform: translateX(10px);
}

.about-content p:nth-child(1) { animation-delay: 0.1s; }
.about-content p:nth-child(2) { animation-delay: 0.2s; }
.about-content p:nth-child(3) { animation-delay: 0.3s; }
.about-content p:nth-child(4) { animation-delay: 0.4s; }

/* ===== Портфолио ===== */
.portfolio-section {
    background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-darker) 100%);
    position: relative;
}

.portfolio-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-pink), transparent);
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    aspect-ratio: 1;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.portfolio-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 0, 170, 0.1), rgba(125, 0, 255, 0.1));
    opacity: 0;
    transition: opacity 0.5s;
    z-index: 1;
}

.portfolio-item:hover::before {
    opacity: 1;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.portfolio-item:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--accent-pink);
    box-shadow: var(--shadow-glow);
}

.portfolio-item:hover img {
    transform: scale(1.15) rotate(2deg);
}

.portfolio-placeholder {
    background: linear-gradient(135deg, rgba(255, 0, 170, 0.1), rgba(125, 0, 255, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
    padding: 2rem;
    border-radius: 20px;
}

/* ===== AI Assistant ===== */
.ai-section {
    background: radial-gradient(circle at 50% 50%, rgba(125, 0, 255, 0.1) 0%, transparent 70%);
    position: relative;
}

.ai-subtitle {
    color: var(--text-secondary) !important;
    font-size: 1.1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem 2rem;
    border-radius: 15px;
    display: inline-block;
    backdrop-filter: blur(10px);
}

.ai-form-container {
    background: var(--bg-card);
    border-radius: 30px;
    padding: 3rem;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transition: all 0.4s;
}

.ai-form-container:hover {
    border-color: var(--accent-pink);
    box-shadow: 0 25px 70px rgba(255, 0, 170, 0.2);
}

.input-group-lg {
    position: relative;
}

.input-group-lg .form-control {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 1.25rem 2rem;
    font-size: 1.1rem;
    border-radius: 50px 0 0 50px;
    transition: all 0.3s;
}

.input-group-lg .form-control:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-pink);
    color: var(--text-primary);
    box-shadow: 0 0 0 4px rgba(255, 0, 170, 0.1);
    outline: none;
}

.input-group-lg .form-control::placeholder {
    color: var(--text-muted);
}

.input-group-lg .btn {
    border-radius: 0 50px 50px 0;
    padding: 1.25rem 2.5rem;
}

.ai-response {
    margin-top: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(255, 0, 170, 0.1), rgba(125, 0, 255, 0.1));
    border-left: 4px solid var(--accent-pink);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 1.15rem;
    line-height: 1.8;
    display: none;
    animation: slideIn 0.5s ease;
    backdrop-filter: blur(10px);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.ai-response.show {
    display: block;
}

.ai-response.error {
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.1), rgba(255, 100, 100, 0.1));
    border-left-color: #ff4444;
    color: #ff6b6b;
}

/* ===== Контактная форма ===== */
.contact-form {
    background: var(--bg-card);
    border-radius: 30px;
    padding: 3.5rem;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transition: all 0.4s;
}

.contact-form:hover {
    border-color: var(--accent-purple);
    box-shadow: 0 25px 70px rgba(125, 0, 255, 0.2);
}

.form-label {
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-control,
.form-control:focus {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 1rem 1.5rem;
    border-radius: 15px;
    transition: all 0.3s;
    font-size: 1rem;
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 4px rgba(125, 0, 255, 0.1);
    color: var(--text-primary);
    outline: none;
}

.form-control::placeholder {
    color: var(--text-muted);
}

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

.form-check {
    margin-top: 1.5rem;
}

.form-check-label {
    color: var(--text-secondary);
    font-size: 0.95rem;
    text-transform: none;
    letter-spacing: normal;
    cursor: pointer;
}

.form-check-input {
    background-color: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.3);
    width: 1.25em;
    height: 1.25em;
    margin-top: 0.25em;
    cursor: pointer;
    transition: all 0.3s;
}

.form-check-input:checked {
    background-color: var(--accent-pink);
    border-color: var(--accent-pink);
    box-shadow: 0 0 0 4px rgba(255, 0, 170, 0.2);
}

#contact-message {
    min-height: 60px;
}

.alert {
    border-radius: 15px;
    border: none;
    padding: 1.25rem 1.5rem;
    font-size: 1rem;
    backdrop-filter: blur(10px);
}

.alert-success {
    background: linear-gradient(135deg, rgba(0, 255, 100, 0.1), rgba(0, 200, 100, 0.1));
    color: #90ee90;
    border-left: 4px solid #90ee90;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.1), rgba(255, 100, 100, 0.1));
    color: #ff6b6b;
    border-left: 4px solid #ff6b6b;
}

/* ===== Соцсети ===== */
.social-section {
    background: var(--bg-darker);
    padding: 5rem 0;
    position: relative;
}

.social-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-purple), transparent);
}

.social-section h3 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: 3rem;
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.social-link {
    color: var(--text-secondary);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
    z-index: 0;
}

.social-link:hover::before {
    width: 100px;
    height: 100px;
}

.social-link svg {
    width: 32px;
    height: 32px;
    position: relative;
    z-index: 1;
    transition: transform 0.3s;
}

.social-link:hover {
    color: var(--text-primary);
    transform: translateY(-8px) scale(1.1);
    border-color: var(--accent-pink);
    box-shadow: var(--shadow-glow);
}

.social-link:hover svg {
    transform: rotate(10deg) scale(1.1);
}

/* ===== Футер ===== */
.footer {
    background: var(--bg-darker);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    font-size: 0.95rem;
    padding: 3rem 0;
    text-align: center;
}

.footer p {
    margin: 0;
    font-size: 1rem;
}

/* ===== Анимации ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.fade-in.delay-1 {
    animation-delay: 0.2s;
}

.fade-in.delay-2 {
    animation-delay: 0.4s;
}

.fade-in.delay-3 {
    animation-delay: 0.6s;
}

/* ===== Плавная прокрутка ===== */
html {
    scroll-behavior: smooth;
}

/* ===== Скроллбар (для вебкит) ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent-pink), var(--accent-purple));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--accent-purple), var(--accent-pink));
}

/* ===== Адаптивность ===== */
@media (max-width: 992px) {
    .about-section,
    .portfolio-section,
    .ai-section,
    .contact-section {
        padding: 5rem 0;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 0;
    }
    
    .about-section,
    .portfolio-section,
    .ai-section,
    .contact-section {
        padding: 4rem 0;
    }
    
    .section-title {
        margin-bottom: 3rem;
    }
    
    .contact-form,
    .ai-form-container {
        padding: 2rem;
        border-radius: 20px;
    }
    
    .social-links {
        gap: 2rem;
    }
    
    .social-link {
        width: 60px;
        height: 60px;
    }
    
    .social-link svg {
        width: 28px;
        height: 28px;
    }
    
    .input-group-lg .form-control {
        border-radius: 15px;
        margin-bottom: 1rem;
    }
    
    .input-group-lg .btn {
        border-radius: 15px;
        width: 100%;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-text {
        font-size: 1rem;
    }
    
    .about-content {
        font-size: 1rem;
    }
    
    .about-content p:hover {
        transform: none; /* Отключаем hover на мобильных */
    }
    
    .contact-form,
    .ai-form-container {
        padding: 1.5rem;
    }
    
    .social-section {
        padding: 3rem 0;
    }
    
    .scroll-progress {
        height: 2px;
    }
}

/* ===== Дополнительные эффекты ===== */
@supports (backdrop-filter: blur(10px)) {
    .ai-form-container,
    .contact-form,
    .portfolio-item,
    .social-link {
        backdrop-filter: blur(20px);
    }
}

/* ===== Улучшенная типографика ===== */
.about-content p::first-letter {
    font-size: 1.5em;
    font-weight: 600;
    color: var(--accent-pink);
    float: left;
    line-height: 1;
    margin-right: 0.5rem;
    margin-top: 0.1em;
}

/* ===== Плавные переходы для всех интерактивных элементов ===== */
a, button, input, textarea, select {
    transition: all 0.3s ease;
}

/* ===== Улучшенный фокус для доступности ===== */
*:focus-visible {
    outline: 2px solid var(--accent-pink);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== Улучшенная производительность анимаций ===== */
.hero-title,
.hero-subtitle,
.hero-text,
.portfolio-item,
.btn,
.social-link,
.back-to-top {
    will-change: transform;
}

/* ===== Дополнительные hover эффекты ===== */
.portfolio-item::after {
    content: '👁️';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 2rem;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2;
    pointer-events: none;
}

.portfolio-item:hover::after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* Улучшение производительности */
.portfolio-item,
.btn,
.social-link {
    will-change: transform;
}

/* ===== Scroll Progress Bar ===== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-pink), var(--accent-purple), var(--accent-cyan));
    z-index: 9999;
    transition: width 0.1s ease-out;
    box-shadow: 0 0 10px rgba(255, 0, 170, 0.5);
}

/* ===== Back to Top Button ===== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(255, 0, 170, 0.3);
    opacity: 0;
    transform: translateY(20px);
}

.back-to-top.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 15px 40px rgba(255, 0, 170, 0.5);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
}

/* ===== Portfolio Modal ===== */
.portfolio-modal-content {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    backdrop-filter: blur(20px);
}

.portfolio-modal-header {
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
}

.portfolio-modal-body {
    background: var(--bg-darker);
}

.portfolio-modal-body img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 80vh;
    object-fit: contain;
}

/* ===== Scroll Animations ===== */
.scroll-animate {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-animate.animated {
    opacity: 1;
    transform: translateY(0);
}

/* ===== AI History ===== */
.ai-history {
    display: none;
}

.ai-history.show {
    display: block;
}

.ai-history-title {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ai-history-item {
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid var(--accent-pink);
    padding: 1rem;
    margin-bottom: 0.75rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.ai-history-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-left-color: var(--accent-purple);
    transform: translateX(5px);
}

.ai-history-item-word {
    font-weight: 600;
    color: var(--accent-pink);
    margin-right: 0.5rem;
}

.ai-history-clear {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.3s;
}

.ai-history-clear:hover {
    color: var(--accent-pink);
}

/* ===== Form Validation ===== */
.form-control.is-invalid {
    border-color: #ff4444;
    background: rgba(255, 68, 68, 0.1);
}

.form-control.is-valid {
    border-color: #90ee90;
    background: rgba(144, 238, 144, 0.1);
}

.invalid-feedback {
    display: none;
    color: #ff6b6b;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.form-control.is-invalid ~ .invalid-feedback {
    display: block;
}

/* ===== Character Counter ===== */
.form-text {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

#idea-counter {
    color: var(--accent-pink);
    font-weight: 600;
}

/* ===== Responsive Improvements ===== */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 45px;
        height: 45px;
    }
    
    .back-to-top svg {
        width: 20px;
        height: 20px;
    }
    
    .portfolio-modal-body img {
        max-height: 70vh;
    }
}
