/* БАЗОВЫЕ СТИЛИ */
:root {
    /* Основные цвета из палитры */
    --primary-color: #ac4477;
    --secondary-color: #ac44ca;
    --tertiary-color: #c07b8b;
    --accent-color: #d14477;
    
    /* Дополнительные цвета */
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --gray-color: #6c757d;
    --light-gray: #e9ecef;
    
    /* Градиенты */
    --gradient-primary: linear-gradient(135deg, #ac4477, #d14477);
    --gradient-secondary: linear-gradient(135deg, #ac44ca, #c07b8b);
    --gradient-tertiary: linear-gradient(135deg, #c07b8b, #ac4477);
    --gradient-accent: linear-gradient(135deg, #d14477, #ac44ca);
    
    /* Тени */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    
    /* Скругления */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    
    /* Отступы */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-color);
    color: var(--dark-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* HEADER СТИЛИ */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-xl);
    background: white;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.logo-icon {
    font-size: 2rem;
    color: var(--primary-color);
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.version {
    background: var(--gradient-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.nav {
    display: flex;
    gap: var(--spacing-xs);
}

.nav-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    background: transparent;
    color: var(--gray-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.nav-btn:hover {
    background-color: var(--light-gray);
    color: var(--primary-color);
}

.nav-btn.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.header-actions {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
}

.auth-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.login-btn {
    background: linear-gradient(135deg, #ac4477, #d14477);
    color: white;
    border: 2px solid transparent;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(172, 68, 119, 0.3);
}

.signup-btn {
    background: linear-gradient(135deg, #ac44ca, #c07b8b);
    color: white;
    border: 2px solid transparent;
}

.signup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(172, 68, 155, 0.3);
}

/* Кнопка техподдержки */
.support-btn {
    background: linear-gradient(135deg, #ff9800, #ff5722);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 10px;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.support-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 152, 0, 0.5);
}

/* MAIN CONTENT */
.main-content {
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-xl);
    width: 100%;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* HERO SECTION */
.hero {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-xl);
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    color: white;
    box-shadow: var(--shadow-lg);
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
    font-weight: 800;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* ALL FUNCTIONS BLOCK */
.all-functions-block {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-lg);
    margin-bottom: var(--spacing-xl);
}

.all-functions-block h3 {
    font-size: 1.75rem;
    margin-bottom: var(--spacing-xs);
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.block-subtitle {
    color: var(--gray-color);
    margin-bottom: var(--spacing-lg);
    font-size: 1.1rem;
}

.functions-grid-large {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.function-card-large {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.function-card-large:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.card-header-large {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.card-icon-large {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: var(--shadow-md);
}

.card-title-large {
    flex: 1;
}

.card-title-large h4 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
    color: var(--dark-color);
}

.card-badge {
    background: var(--light-gray);
    color: var(--gray-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.card-description-large {
    color: var(--gray-color);
    margin-bottom: var(--spacing-md);
    flex: 1;
    line-height: 1.6;
}

.card-stats-large {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.stat-large {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--gray-color);
}

.stat-large i {
    color: var(--primary-color);
}

.run-btn-large {
    padding: 1rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 1rem;
    margin-top: auto;
}

.run-btn-large:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.run-btn-large:active {
    transform: translateY(0);
}

/* DETAILS TAB */
.functions-detail {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-lg);
}

.functions-detail h2 {
    font-size: 2rem;
    margin-bottom: var(--spacing-xs);
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-description {
    color: var(--gray-color);
    margin-bottom: var(--spacing-xl);
    font-size: 1.1rem;
}

.function-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-lg);
}

.function-detail-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    border: 2px solid var(--light-gray);
    transition: all 0.3s ease;
}

.function-detail-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.detail-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--light-gray);
}

.detail-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.detail-header h3 {
    font-size: 1.5rem;
    color: var(--dark-color);
}

.detail-content p {
    color: var(--gray-color);
    margin-bottom: var(--spacing-lg);
    line-height: 1.7;
}

.detail-params {
    background: var(--light-gray);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
}

.detail-params h4 {
    color: var(--dark-color);
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-params ul {
    list-style: none;
    padding-left: 0;
}

.detail-params li {
    padding: 0.5rem 0;
    color: var(--gray-color);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.detail-params li:last-child {
    border-bottom: none;
}

.detail-params strong {
    color: var(--primary-color);
}

.detail-genres {
    margin-bottom: var(--spacing-lg);
}

.detail-genres h4 {
    color: var(--dark-color);
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.genres-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.genre-tag {
    background: var(--gradient-tertiary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.detail-run-btn {
    width: 100%;
    padding: 1rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 1rem;
}

.detail-run-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ВКЛАДКА "ЗАКАЗАТЬ ПРИЛОЖЕНИЕ" */
.order-container {
    padding: var(--spacing-xl);
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.order-header {
    margin-bottom: var(--spacing-xl);
    text-align: center;
}

.order-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    display: inline-block;
}

.order-header h2 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--dark-color);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.order-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin: var(--spacing-xl) 0;
}

.order-step {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    border: 2px solid var(--light-gray);
    transition: all 0.3s ease;
    text-align: left;
}

.order-step:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.step-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    display: block;
}

.step-number {
    display: inline-block;
    background: var(--gradient-primary);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    text-align: center;
    line-height: 32px;
    font-weight: bold;
    margin-right: var(--spacing-xs);
    margin-bottom: var(--spacing-sm);
}

.order-step h3 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
    color: var(--dark-color);
    display: flex;
    align-items: center;
}

.order-step p {
    color: var(--gray-color);
    line-height: 1.6;
}

.contact-info {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    margin-top: var(--spacing-xl);
    text-align: center;
}

.contact-info h3 {
    color: var(--dark-color);
    margin-bottom: var(--spacing-md);
    font-size: 1.5rem;
}

.contact-info p {
    color: var(--gray-color);
    margin-bottom: var(--spacing-lg);
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    margin: var(--spacing-md) 0;
}

.contact-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.coming-soon {
    background: linear-gradient(135deg, #ffc107, #ff9800);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: var(--spacing-lg);
    display: inline-block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* MODAL STYLES */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.modal {
    background: white;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.parsing-modal-content {
    max-width: 900px;
    width: 95%;
    transition: all 0.3s ease;
}

.parsing-modal-content.fullscreen {
    max-width: 98% !important;
    width: 98% !important;
    height: 98vh !important;
    margin: 1vh auto !important;
    padding: 0 !important;
}

.fullscreen .modal-body {
    height: calc(100% - 60px);
    padding: 20px;
    overflow: hidden;
}

.fullscreen .results-container {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.fullscreen .results-table-container {
    flex: 1;
    max-height: none !important;
    height: calc(100% - 120px);
    overflow: auto !important;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg);
    background: var(--gradient-primary);
    color: white;
}

.modal-header h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: var(--spacing-lg);
    max-height: 70vh;
    overflow-y: auto;
}

/* AUTH MODAL */
.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: var(--spacing-lg);
    border-bottom: 2px solid var(--light-gray);
}

.auth-tab {
    flex: 1;
    padding: var(--spacing-md);
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.auth-tab:hover:not(.active) {
    color: var(--dark-color);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.password-requirements {
    font-size: 0.85rem;
    color: #666;
    margin-top: 5px;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-color);
    cursor: pointer;
}

.checkbox input {
    width: auto;
}

.forgot-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
}

.forgot-link:hover {
    text-decoration: underline;
}

.auth-submit-btn {
    width: 100%;
    padding: 1rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 1rem;
    margin-bottom: var(--spacing-md);
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* PARSING MODAL */
.progress-container {
    margin-bottom: var(--spacing-lg);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

#progressTitle {
    font-weight: 600;
    color: var(--dark-color);
}

#progressPercent {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.25rem;
}

.progress-bar {
    height: 12px;
    background-color: var(--light-gray);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: var(--spacing-md);
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 6px;
    transition: width 0.5s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-md);
    background: var(--light-gray);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
}

.progress-details .detail {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.progress-details i {
    color: var(--primary-color);
    font-size: 1.25rem;
}

.detail-label {
    display: block;
    font-size: 0.85rem;
    color: var(--gray-color);
}

.detail-value {
    display: block;
    font-weight: 600;
    color: var(--dark-color);
}

/* CONSOLE */
.console-container {
    margin-bottom: var(--spacing-lg);
}

.console-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--light-gray);
}

.console-header span {
    font-weight: 600;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.console-clear-btn {
    padding: 0.5rem 1rem;
    background: var(--light-gray);
    color: var(--gray-color);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.console-clear-btn:hover {
    background: var(--primary-color);
    color: white;
}

.console-output {
    background: #1a1a1a;
    color: #f0f0f0;
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    height: 250px;
    overflow-y: auto;
    position: relative;
}

.console-line {
    margin-bottom: 0.5rem;
    padding: 0.25rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.console-line:last-child {
    border-bottom: none;
}

.console-line.info {
    color: #4fc3f7;
}

.console-line.success {
    color: #69f0ae;
}

.console-line.warning {
    color: #ffd740;
}

.console-line.error {
    color: #ff5252;
}

.timestamp {
    color: #757575;
    margin-right: 1rem;
}

/* RESULTS TABLE */
.results-container {
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--light-gray);
}

.results-header h4 {
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.results-stats {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.results-stats span {
    font-weight: 600;
    color: var(--primary-color);
}

.results-time {
    color: var(--gray-color) !important;
    font-weight: 500 !important;
}

.results-table-container {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: var(--spacing-lg);
    border: 1px solid var(--light-gray);
    border-radius: var(--radius-md);
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.results-table th {
    background: var(--light-gray);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--dark-color);
    position: sticky;
    top: 0;
    border-bottom: 2px solid var(--light-gray);
    z-index: 10;
}

.results-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--light-gray);
    color: var(--gray-color);
}

.results-table tr:hover td {
    background-color: rgba(172, 68, 119, 0.05);
}

/* MODAL CONTROLS */
.modal-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding: 1rem;
    border-top: 1px solid var(--light-gray);
}

.control-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.stop-btn {
    background: linear-gradient(135deg, #f44336, #e53935);
    color: white;
}

.stop-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(244, 67, 54, 0.3);
}

/* Кнопка закрытия таблицы */
.close-table-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    margin-left: auto;
    transition: transform 0.3s ease;
}

.close-table-btn:hover {
    transform: rotate(90deg);
    color: var(--accent-color);
}

/* Уведомления */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
    max-width: 400px;
    font-size: 14px;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* Loading overlay */
#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

#loadingOverlay div {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #ac4477;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Бейджи для жанров и функций */
.genre-tag, .function-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #ac44ca, #c07b8b);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.function-badge {
    background: linear-gradient(135deg, #c07b8b, #ac4477);
}

/* FOOTER */
.footer {
    background: var(--dark-color);
    color: white;
    padding: var(--spacing-xl) 0 0;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-xl) var(--spacing-xl);
}

.footer-section h4 {
    color: white;
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-section p {
    color: #b0b0b0;
    line-height: 1.7;
    margin-bottom: var(--spacing-sm);
}

.footer-bottom {
    background: rgba(0, 0, 0, 0.2);
    padding: var(--spacing-md);
    text-align: center;
    color: #b0b0b0;
    font-size: 0.9rem;
}

/* RESPONSIVE DESIGN */
@media (max-width: 1200px) {
    .functions-grid-large {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .function-detail-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .order-steps {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: var(--spacing-md);
        padding: var(--spacing-md);
    }
    
    .nav {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .header-actions {
        width: 100%;
        justify-content: center;
    }
    
    .functions-grid-large {
        grid-template-columns: 1fr;
    }
    
    .function-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .order-steps {
        grid-template-columns: 1fr;
    }
    
    .modal-controls {
        flex-direction: column;
    }
    
    .control-btn {
        width: 100%;
        margin-left: 0 !important;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    /* Адаптивные стили для модального окна парсинга */
    .parsing-modal-content {
        width: 95% !important;
        max-width: 95% !important;
        height: 95vh !important;
    }
    
    .results-table {
        min-width: 600px;
    }
}

@media (max-width: 480px) {
    .hero h2 {
        font-size: 2rem;
    }
    
    .nav-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .auth-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .run-btn-large {
        padding: 0.75rem;
    }
    
    .order-container {
        padding: var(--spacing-md);
    }
    
    .order-header h2 {
        font-size: 2rem;
    }
    
    .order-step {
        padding: var(--spacing-md);
    }
    
    .contact-info {
        padding: var(--spacing-md);
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
    }
    
    .results-table {
        min-width: 400px;
    }
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.console-line {
    animation: slideInUp 0.3s ease;
}

/* Улучшенные стили для таблицы результатов */
.results-table-container {
    max-height: 70vh;
    overflow-y: auto;
}

/* Стили для стадий парсинга */
.stage-container {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--light-gray);
    border-radius: var(--radius-md);
}

.stage-title {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stage-progress {
    height: 6px;
    background: white;
    border-radius: 3px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.stage-progress-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Стили для уведомлений */
.notification.success {
    background: #4CAF50;
}

.notification.error {
    background: #f44336;
}

.notification.warning {
    background: #FF9800;
}

.notification.info {
    background: #2196F3;
}

/* Стили для ссылок в таблице результатов */
.results-table a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.results-table a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Стили для значков в таблице */
.results-table .fa-external-link-alt {
    font-size: 0.9rem;
}

.results-table .fa-user {
    font-size: 0.9rem;
}

/* Стили для полноэкранного режима таблицы */
.fullscreen .results-table th {
    background: linear-gradient(135deg, #ac4477, #d14477);
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
}

.fullscreen .results-table-container {
    border: none;
    border-radius: 0;
}

.fullscreen .results-table {
    min-width: 100%;
}

/* Стили для скроллбаров */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-gray);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* Стили для консоли с цветовым кодированием */
.console-line.success {
    background: rgba(105, 240, 174, 0.1);
    color: #69f0ae;
}

.console-line.error {
    background: rgba(255, 82, 82, 0.1);
    color: #ff5252;
}

.console-line.warning {
    background: rgba(255, 215, 64, 0.1);
    color: #ffd740;
}

.console-line.info {
    background: rgba(79, 195, 247, 0.1);
    color: #4fc3f7;
}

/* Стили для плавных переходов */
* {
    transition: background-color 0.3s ease, 
                border-color 0.3s ease, 
                color 0.3s ease, 
                transform 0.3s ease, 
                opacity 0.3s ease;
}

/* Стили для иконок в новом разделе */
.order-step .fas {
    color: var(--primary-color);
}

.contact-item .fas {
    color: var(--accent-color);
}

/* Дополнительные стили для улучшения UX */
.tab-content {
    position: relative;
}

.tab-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tab-content.active::before {
    opacity: 1;
}