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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--bg-color);
    overflow-x: hidden;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 14px 28px;
    background: var(--btn-bg);
    color: var(--btn-color);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: var(--btn-shadow);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--btn-shadow-hover);
}

.btn-large {
    padding: 18px 36px;
    font-size: 1.1rem;
}

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

.btn-secondary {
    background: var(--btn-secondary-bg);
    box-shadow: var(--btn-secondary-shadow);
}

.btn-secondary:hover {
    background: var(--btn-secondary-bg-hover);
    transform: translateY(-2px);
}

.btn:disabled,
.btn-disabled {
    background: #9ca3af !important;
    color: #ffffff !important;
    cursor: not-allowed !important;
    opacity: 0.6;
    box-shadow: none !important;
    transform: none !important;
}

.btn:disabled:hover,
.btn-disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* App States */
.app-state {
    min-height: 100vh;
}

.app-state-center {
    padding: 4rem 2rem;
}

.app-state-center-text {
    text-align: center;
}

.app-state-center-text h1 {
    text-align: center;
    margin-bottom: 2rem;
}

.app-state-center-text p {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--secondary-color);
}

.btn-full-width {
    width: 100%;
    margin-top: 2rem;
}

.report-actions-center {
    text-align: center;
    margin-top: 3rem;
}

/* Landing Page Styles */
.landing-page {
    min-height: 100vh;
}

.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    background: var(--hero-bg);
    position: relative;
    overflow: hidden;
}

/* Фоновая анимация */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--hero-bg-animated);
    background-size: 300% 300%;
    animation: gradientShift 12s ease infinite;
    opacity: var(--hero-overlay-opacity);
}

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

.hero-content {
    max-width: 800px;
    text-align: center;
    z-index: 1;
    position: relative;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    color: var(--hero-title-color);
    margin-bottom: 1.5rem;
    line-height: 1.1;
    text-shadow: var(--hero-title-shadow);
    animation: fadeInUp 0.8s ease-out;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--hero-description-color);
    margin-bottom: 2.5rem;
    line-height: 1.8;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-content .btn {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

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

.features {
    padding: 6rem 0;
    background: var(--section-bg);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: var(--card-shadow);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-shadow-hover);
}

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

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.feature-card p {
    color: var(--secondary-color);
    line-height: 1.6;
}

.how-it-works {
    padding: 6rem 0;
    background: var(--bg-color);
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.step {
    text-align: center;
    position: relative;
}

.step-number {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--step-number-bg);
    color: var(--step-number-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1.5rem;
    box-shadow: var(--step-number-shadow);
}

.step h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.step p {
    color: var(--secondary-color);
    line-height: 1.6;
}

.cta-section {
    padding: 6rem 0;
    background: var(--cta-bg);
    text-align: center;
    color: var(--cta-color);
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Upload Page */
.upload-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--upload-page-bg);
}

.upload-page .container {
    max-width: 600px;
    width: 100%;
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}

.upload-page h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #1f2937;
    text-align: center;
}

.upload-page > .container > p {
    text-align: center;
    color: #6b7280;
    margin-bottom: 2rem;
}

.upload-form {
    margin-top: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input[type="email"],
.form-group input[type="text"] {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input[type="email"]:focus,
.form-group input[type="text"]:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.upload-area {
    width: 100%;
    min-height: 200px;
    border: 2px dashed #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.upload-area:hover {
    border-color: #6366f1;
    background: #f3f4f6;
}

.upload-area.drag-over {
    border-color: #6366f1;
    background: #ede9fe;
    transform: scale(1.02);
}

.upload-placeholder {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
}

.upload-placeholder svg {
    margin-bottom: 1rem;
    color: #9ca3af;
}

.upload-text {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.upload-hint {
    color: #6b7280;
    font-size: 0.9rem;
}

.upload-preview {
    width: 100%;
    height: 100%;
    position: relative;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-preview img {
    width: 100%;
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.remove-image {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
}

.remove-image:hover {
    background: rgba(220, 38, 38, 0.9);
    transform: scale(1.1);
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

/* Paywall Page */
.paywall-page {
    min-height: 100vh;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.paywall-page .container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}

.preview-section {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    border: 2px solid #e5e7eb;
}

.preview-photo {
    margin: 1.5rem 0;
    text-align: center;
}

.preview-photo img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    object-fit: contain;
}

.preview-content {
    margin-top: 1.5rem;
    line-height: 1.8;
    font-size: 1.05rem;
    color: #374151;
}

.preview-note {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(99, 102, 241, 0.1);
    border-left: 4px solid #6366f1;
    border-radius: 8px;
}

.preview-note p {
    margin: 0;
    color: #6366f1;
    font-weight: 500;
}

.payment-section {
    margin-top: 2rem;
}

.price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #6366f1;
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

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

/* Report Page */
.report-page {
    min-height: 100vh;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.report-page .container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}

.report-section {
    margin-top: 2rem;
}

.report-photo {
    margin: 2rem 0;
    text-align: center;
    display: none; /* Скрываем по умолчанию, показываем через JS */
}

.report-photo img {
    width: 100%;
    max-width: 500px;
    max-height: 400px;
    object-fit: contain;
    border-radius: 12px;
    margin: 0 auto;
    display: block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background: #f9fafb;
}

.report-content {
    margin-top: 2rem;
    line-height: 1.8;
    white-space: pre-wrap;
}

.report-actions {
    margin-top: 2rem;
    text-align: center;
}

/* Paywall specific styles */
.paywall-header {
    text-align: center;
    margin-bottom: 3rem;
}

.paywall-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.paywall-header p {
    font-size: 1.25rem;
    color: #6b7280;
}

.payment-info {
    margin-bottom: 2rem;
}

.payment-info h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: #1f2937;
}

.payment-note {
    margin-top: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border-left: 4px solid #6366f1;
    border-radius: 8px;
    color: #374151;
    font-size: 0.95rem;
}

.preview-section h2 {
    margin-bottom: 1rem;
    color: #1f2937;
}

.payment-section > div {
    text-align: center;
    margin-bottom: 2rem;
}

.payment-section h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.price span {
    font-size: 2rem;
}

.payment-form button {
    width: 100%;
    justify-content: center;
    margin-top: 1rem;
}

/* Report specific styles */
.report-page .container > div:first-child {
    text-align: center;
    margin-bottom: 3rem;
}

.report-page h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.report-page > .container > div:first-child > p {
    font-size: 1.25rem;
    color: #6b7280;
}

.report-section h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: #1f2937;
}

/* Upload specific styles */
.upload-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 1rem;
}

#photo {
    display: none;
}

.upload-form button {
    width: 100%;
    justify-content: center;
}

.upload-placeholder small {
    display: block;
    margin-top: 0.5rem;
    color: #6b7280;
}

/* Preview Page */
.preview-page {
    min-height: 100vh;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.preview-page .container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}

.preview-header {
    text-align: center;
    margin-bottom: 3rem;
}

.preview-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.preview-header p {
    font-size: 1.25rem;
    color: #6b7280;
}

.preview-section {
    margin-bottom: 3rem;
}

.preview-photo {
    margin: 2rem 0;
    text-align: center;
}

.preview-photo img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    object-fit: contain;
}

.preview-content h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: #1f2937;
}

.preview-text {
    line-height: 1.8;
    font-size: 1.05rem;
    color: #374151;
    padding: 1.5rem;
    background: #f9fafb;
    border-radius: 12px;
    border-left: 4px solid #6366f1;
}

.preview-note {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-left: 4px solid #6366f1;
    border-radius: 12px;
    text-align: center;
}

.preview-note p {
    margin: 0;
    color: #6366f1;
    font-weight: 600;
    font-size: 1.1rem;
}

.preview-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        padding: 3rem 1rem;
        min-height: 80vh;
    }

    .hero-title {
        font-size: 2.5rem;
    }

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

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

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

    .section-title {
        font-size: 2rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 1rem;
    }

    .upload-page .container,
    .paywall-page .container,
    .report-page .container {
        padding: 2rem 1.5rem;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
}

.modal-content {
    background-color: white;
    padding: 2.5rem;
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    max-height: calc(100vh - 2rem);
    height: auto;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.modal-content > * {
    flex-shrink: 0;
}

.modal-content .modal-body {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
    padding-right: 1.5rem;
    margin-right: -0.5rem;
    padding-left: 0;
    margin-left: 0;
    -webkit-overflow-scrolling: touch;
}

.modal-content-large {
    max-width: 900px;
}

.modal-content-report {
    max-width: 1200px;
}

.modal-close {
    position: absolute;
    right: 1.25rem;
    top: 1.25rem;
    font-size: 0;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    padding: 0;
    margin: 0;
    text-align: center;
}

.modal-close::before {
    content: '';
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    transform: rotate(45deg);
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: -1px;
    margin-left: -9px;
}

.modal-close::after {
    content: '';
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    transform: rotate(-45deg);
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: -1px;
    margin-left: -9px;
}

.modal-close:hover {
    color: #1f2937;
}

.modal-content h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #1f2937;
}

.modal-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #1f2937;
}

.modal-content .report-header {
    text-align: center;
    margin-bottom: 2rem;
}

.modal-content .report-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.modal-content .report-header p {
    font-size: 1.1rem;
    color: #6b7280;
}

.modal-content .upload-area {
    margin: 1.5rem 0;
}

.modal-content .form-group {
    margin-bottom: 1.5rem;
}

.modal-content .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.modal-content .modal-body h2:first-child {
    margin-top: 0;
}

.modal-content .modal-body > *:last-child {
    margin-bottom: 0;
}


.modal-content .form-group input[type="email"] {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.modal-content .form-group input[type="email"]:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.modal-content .btn-remove {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
}

.modal-content .btn-remove:hover {
    background: #dc2626;
}

/* Report Loading State */
.report-loading {
    text-align: center;
    padding: 4rem 2rem;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 2rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.report-loading h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #1f2937;
}

.report-loading p {
    font-size: 1.1rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.loading-note {
    margin-top: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
    color: #6b7280;
    font-size: 0.95rem;
}

/* Report Preview Section */
.report-preview-section {
    margin: 2rem 0;
    padding: 2rem;
    background: #f9fafb;
    border-radius: 12px;
}

.report-preview-section h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: #1f2937;
}

.preview-text {
    line-height: 1.8;
    font-size: 1.05rem;
    color: #374151;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    border-left: 4px solid #6366f1;
    margin-bottom: 1.5rem;
}

.report-header {
    text-align: center;
    margin-bottom: 3rem;
}

.report-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.report-header p {
    font-size: 1.25rem;
    color: #6b7280;
}

/* Email Section */
.email-section {
    margin: 3rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-radius: 16px;
    border: 2px solid rgba(99, 102, 241, 0.2);
}

.email-box {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.email-box h2 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    color: #1f2937;
}

.email-box > p {
    font-size: 1.1rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
}

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

.email-form .form-group {
    margin-bottom: 1.5rem;
}

.email-form .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
    text-align: left;
}

.email-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.email-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.upload-preview-hidden {
    display: none;
}

.file-input-hidden {
    display: none;
}

.error-message-hidden {
    display: none;
}

/* Animation */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Language Switcher */
.language-switcher {
    margin-left: auto;
}

.language-switcher select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    background: var(--bg-color, #ffffff);
    color: var(--text-color, #1f2937);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
}

.language-switcher select:hover {
    border-color: var(--btn-primary-bg, #6366f1);
}

.language-switcher select:focus {
    outline: none;
    border-color: var(--btn-primary-bg, #6366f1);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

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

