/* TrendyBig.com - Main Stylesheet */

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

:root {
    --bg-color: #F9F9F9;
    --white: #FFFFFF;
    --logo-bg: #D6C2D3;
    --logo-text: #4F4F4F;
    --title-color: #716868;
    --text-color: #504E4E;
    --placeholder-color: #838383;
    --button-bg: #000000;
    --button-text: #FFFFFF;
    --form-bg: #FBF9FB;
    --border-color: #DBDBDB;
    --orientation-active: #F5F5F5;
    --orientation-inactive: #FFFFFF;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    font-weight: 400;
}

/* Header */
.main-header {
    background-color: var(--bg-color);
    padding: 49px 20px 0;
}

.header-container {
    max-width: 1420px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.header-top-line {
    width: 424px;
    height: 3px;
    margin-left: auto;
    margin-right: 45px;
    background-color: transparent;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-ellipse {
    width: 70px;
    height: 70px;
    border-radius: 100px;
    background-color: var(--logo-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 25px;
}

.logo-letter {
    font-size: 52px;
    font-weight: 500;
    line-height: 1.21;
    color: var(--button-bg);
    text-align: center;
}

.logo-text {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.logo-brand {
    font-size: 48px;
    font-weight: 500;
    line-height: 1.21;
    color: var(--logo-text);
    text-align: center;
}

/* Main Content */
.main-content {
    max-width: 1420px;
    margin: 0 auto;
    padding: 63px 20px;
    display: flex;
    flex-direction: column;
    gap: 63px;
}

/* Title Section */
.title-section {
    width: 100%;
}

.main-title {
    font-size: 47px;
    font-weight: 400;
    line-height: 1.21;
    color: var(--title-color);
    text-align: center;
    margin: 0;
}

/* Анимация смены слова */
.rotating-word {
    position: relative;
    display: inline-block;
    min-width: 160px;
    height: 1em;
    vertical-align: baseline;
    text-align: center;
    color:black
}

.word-item {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    white-space: nowrap;
    pointer-events: none;
}

.word-item.active {
    opacity: 1;
    transform: translateY(0);
}

/* Contact Form Section */
.contact-form-section {
    width: 100%;
}

.contact-form-container {
    width: 100%;
    max-width: 1402px;
    background-color: var(--white);
    border-radius: 30px;
    padding: 20px 32px 20px 20px;
    display: flex;
    gap: 42px;
    align-items: center;
}

.upload-area {
    flex-shrink: 0;
}

.upload-box {
    width: 290px;
    background-color: var(--form-bg);
    border-radius: 20px;
    padding: 40px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.upload-box:hover {
    background-color: #F5F5F5;
}

.plus-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-text {
    font-size: 27px;
    font-weight: 400;
    line-height: 1.21;
    color: var(--text-color);
    text-align: center;
    margin: 0;
}

.form-fields {
    flex: 1;
    display: flex;
    gap: 10px;
    height: 100%;
}

.form-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.input-group {
    flex: 1;
    padding-top: 24px;
}

.action-input {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    font-size: 26.27px;
    font-weight: 400;
    line-height: 1.21;
    color: var(--text-color);
    font-family: var(--font-family);
    resize: none;
    background: transparent;
}

.action-input::placeholder {
    color: var(--placeholder-color);
}

/* Переключатель ориентации (вертикальное/горизонтальное) */
.orientation-toggle-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.orientation-switch {
    display: flex;
    align-items: center;
    gap: 5.47px;
    padding: 3.98px;
    background-color: #D8D8D8;
    border-radius: 30px;
    cursor: pointer;
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.switch-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4.97px;
    width: 41.28px;
    height: 33.82px;
    border-radius: 14.92px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    color: #313131;
}

.switch-icon svg {
    width: 100%;
    height: 100%;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.switch-icon.active {
    background-color: #313131;
    color: #FFFFFF;
}

.switch-icon:not(.active) {
    background-color: transparent;
    color: #313131;
}

.switch-icon.vertical-icon svg rect {
    fill: currentColor;
}

.switch-icon.horizontal-icon svg rect {
    fill: currentColor;
}

.form-actions {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-end;
    gap: 15px;
    min-width: 200px;
}

.price-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
}

.old-price {
    font-size: 27.55px;
    font-weight: 400;
    line-height: 1.21;
    color: var(--button-bg);
    text-decoration: line-through;
    opacity: 0.6;
}

.new-price {
    font-size: 27.55px;
    font-weight: 400;
    line-height: 1.21;
    color: var(--button-bg);
}

.create-btn {
    width: 100%;
    padding: 12.32px 49.29px;
    background-color: var(--button-bg);
    color: var(--button-text);
    border: none;
    border-radius: 30px;
    font-size: 29.58px;
    font-weight: 400;
    line-height: 1.21;
    cursor: pointer;
    transition: opacity 0.3s;
    font-family: var(--font-family);
}

.create-btn:hover {
    opacity: 0.9;
}

.create-btn:active {
    opacity: 0.8;
}

/* Кнопка "Хочу так же" */
.want-same-btn {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12.32px 49.29px;
    background-color: var(--button-bg);
    color: var(--button-text);
    border: none;
    border-radius: 30px;
    font-size: 29.58px;
    font-weight: 400;
    line-height: 1.21;
    cursor: pointer;
    transition: opacity 0.3s, transform 0.3s, visibility 0.3s, bottom 0.3s ease;
    font-family: var(--font-family);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(20px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.want-same-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.want-same-btn:hover {
    opacity: 0.9;
}

.want-same-btn:active {
    opacity: 0.8;
}

/* Video Grid Section */
.video-grid-section {
    width: 100%;
    padding: 40px 18px;
    box-sizing: border-box;
}

/* На десктопе секция видео занимает 100% ширины экрана */
@media (min-width: 1025px) {
    .video-grid-section {
        width: 100vw;
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
        padding-left: 18px;
        padding-right: 18px;
    }
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    width: 100%;
    max-width: 100%;
}

.video-item {
    width: 100%;
    aspect-ratio: 960 / 1280;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background-color: #000;
}

.video-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Responsive */
@media (max-width: 1440px) {
    .main-content {
        max-width: 100%;
    }
    
    .contact-form-container {
        max-width: 100%;
    }
}

@media (max-width: 1200px) {
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .contact-form-container {
        flex-direction: column;
        padding: 20px;
    }
    
    .upload-area {
        width: 100%;
        flex-shrink: 1;
    }
    
    .upload-box {
        width: 100%;
    }
    
    .form-fields {
        width: 100%;
        flex-direction: column;
    }
    
    .orientation-buttons {
        justify-content: stretch;
        gap: 10px;
    }
    
    .orientation-btn {
        flex: 1;
        width: 100%;
    }
    
    .form-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .create-btn {
        width: 100%;
        order: 1;
    }
    
    .price-info {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 10px;
        justify-content: center;
        order: 2;
    }
    
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .main-header {
        padding: 20px 15px 0;
    }
    
    .header-top-line {
        width: 100%;
        margin: 0;
    }
    
    .logo-ellipse {
        width: 50px;
        height: 50px;
        padding: 0 15px;
    }
    
    .logo-letter {
        font-size: 36px;
    }
    
    .logo-brand {
        font-size: 32px;
    }
    
    .main-content {
        padding: 40px 15px;
        gap: 40px;
    }
    
    .main-title {
        font-size: 32px;
    }
    
    .rotating-word {
        min-width: 150px;
    }
    
    .contact-form-container {
        padding: 15px;
        gap: 20px;
    }
    
    .upload-box {
        padding: 30px 0;
        gap: 20px;
    }
    
    .upload-text {
        font-size: 20px;
    }
    
    .action-input {
        font-size: 20px;
    }
    
    .orientation-toggle-container {
        justify-content: center;
        width: 100%;
    }
    
    .orientation-switch {
        justify-content: center;
    }
    
    .switch-icon {
        flex: 1;
        max-width: 80px;
    }
    
    
    .old-price,
    .new-price {
        font-size: 22px;
    }
    
    .create-btn {
        font-size: 24px;
        padding: 10px 30px;
    }
    
    .want-same-btn {
        font-size: 24px;
        padding: 10px 30px;
        bottom: 20px;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .video-grid-section {
        padding: 20px 10px;
    }
}

/* Footer */
footer {
    background-color: var(--bg-color);
    color: var(--text-color);
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-color);
    text-decoration: none;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 0.8;
}

.footer-content {
    text-align: center;
    margin-bottom: 1rem;
}

.footer-copyright {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.footer-copyright p {
    margin: 0;
}

/* Error Page */
.error-page .error-page-content {
    text-align: center;
    padding: 5rem 0;
}

.error-page-content h1 {
    font-size: 6rem;
    color: var(--title-color);
    margin-bottom: 1rem;
}

.error-page-content p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--button-bg);
    color: var(--button-text);
}

.btn-primary:hover {
    opacity: 0.9;
}

/* Page Header */
.page-header {
    text-align: center;
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--title-color);
}

.page-subtitle {
    color: var(--text-color);
    font-size: 0.9rem;
    margin: 0.25rem 0;
}

/* Content Sections */
.content-section {
    margin-bottom: 2.5rem;
    padding: 1.5rem 0;
}

.content-section h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.content-section h3 {
    font-size: 1.4rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.content-section p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.content-section ul {
    margin: 1rem 0;
    padding-left: 2rem;
}

.content-section li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.content-section a {
    color: var(--button-bg);
    text-decoration: none;
}

.content-section a:hover {
    text-decoration: underline;
}

.content-section strong {
    color: var(--text-color);
    font-weight: 600;
}
