/* Стили для результатов */
#compatibility-result {
    margin-top: 30px;
    animation: fadeInUp 0.5s ease;
}

.compatibility-result-header {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    margin-bottom: 25px;
}

.compatibility-result-header h1 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.combination-info {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    opacity: 0.95;
}

.description {
    font-size: 1rem;
    opacity: 0.9;
    line-height: 1.5;
}

/* Стили для табов навигации */
.compatibility-tabs {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
    overflow: hidden;
}

.tab-navigation {
    display: flex;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    overflow-x: auto;
    padding: 5px;
}

.tab-btn {
    flex: 1;
    min-width: 120px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    margin: 0 2px;
}

.tab-btn:hover {
    background: #e2e8f0;
    color: #475569;
}

.tab-btn.active {
    background: #6366f1;
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.tab-content {
    padding: 30px;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-pane.active {
    display: block;
}

.tab-pane h2 {
    color: #1e293b;
    font-size: 1.4rem;
    margin-bottom: 20px;
    font-weight: 700;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
}

.tab-pane h3 {
    color: #334155;
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-pane p {
    color: #475569;
    line-height: 1.7;
    font-size: 1rem;
    margin-bottom: 0;
}

.general-section {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border-left: 4px solid #6366f1;
}

.general-section h3 {
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.general-section p {
    margin: 0;
}

/* FAQ стили обновленные */
.qa-results {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.qa-results h2 {
    color: #1e293b;
    font-size: 1.4rem;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 700;
}

.qa-item {
    background: #f8fafc;
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.qa-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #6366f1;
}

.qa-question {
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    transition: background-color 0.3s ease;
}

.qa-question:hover {
    background: #e2e8f0;
}

.qa-question span:first-child {
    font-weight: 600;
    color: #334155;
}

.qa-toggle {
    width: 24px;
    height: 24px;
    background: #6366f1;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: all 0.3s ease;
}

.qa-answer {
    padding: 15px 20px;
    background: white;
}

.qa-answer p {
    color: #475569;
    line-height: 1.6;
    margin: 0;
}

/* Загрузка */
.loading-container {
    text-align: center;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 15px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

.loading-container p {
    color: #666;
    font-size: 1.1rem;
    font-weight: 500;
}

/* Ошибки */
.error-container {
    text-align: center;
    padding: 30px;
    background: #f8d7da;
    color: #721c24;
    border-radius: 15px;
    border: 1px solid #f5c6cb;
}

.error-container h4 {
    margin-bottom: 10px;
}

.error-container button {
    margin-top: 15px;
    padding: 10px 20px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.error-container button:hover {
    background: #c82333;
}

/* Анимации */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Адаптивность для табов */
@media (max-width: 768px) {
    .zodiac-compatibility-container {
        margin: 10px;
        padding: 20px;
    }
    
    .compatibility-title {
        font-size: 1.6rem;
    }
    
    .intro-text-block {
        padding: 20px;
        margin-bottom: 25px;
    }
    
    .intro-heading {
        font-size: 1.2rem;
    }
    
    .intro-paragraph {
        font-size: 0.95rem;
    }
    
    .intro-features {
        padding: 20px;
    }
    
    .features-list li {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .reverse-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
        gap: 8px;
    }
    
    .reverse-icon {
        width: 18px;
        height: 18px;
    }
    
    .reverse-text {
        display: none;
    }
    
    .reverse-btn {
        border-radius: 50%;
        width: 44px;
        height: 44px;
        padding: 0;
        justify-content: center;
    }
    
    .compatibility-result-header {
        padding: 20px;
    }
    
    .compatibility-result-header h1 {
        font-size: 1.4rem;
    }
    
    .tab-navigation {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .tab-btn {
        flex: 1 1 calc(50% - 5px);
        min-width: auto;
        font-size: 0.8rem;
        padding: 10px 12px;
    }
    
    .tab-content {
        padding: 20px;
    }
    
    .tab-pane h2 {
        font-size: 1.2rem;
    }
    
    .tab-pane h3 {
        font-size: 1.1rem;
    }
    
    .qa-results {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .compatibility-title {
        font-size: 1.4rem;
    }
    
    .intro-text-block {
        padding: 15px;
    }
    
    .intro-heading {
        font-size: 1.1rem;
    }
    
    .intro-paragraph {
        font-size: 0.9rem;
    }
    
    .intro-features {
        padding: 15px;
    }
    
    .person-card {
        padding: 20px;
    }
    
    .reverse-btn {
        width: 40px;
        height: 40px;
    }
    
    .reverse-icon {
        width: 16px;
        height: 16px;
    }
    
    .tab-btn {
        flex: 1 1 100%;
        margin-bottom: 5px;
    }
    
@media (max-width: 480px) {
    .compatibility-title {
        font-size: 1.4rem;
    }
    
    .intro-text-block {
        padding: 15px;
    }
    
    .intro-heading {
        font-size: 1.1rem;
    }
    
    .intro-paragraph {
        font-size: 0.9rem;
    }
    
    .intro-features {
        padding: 15px;
    }
    
    .person-card {
        padding: 20px;
    }
    
    .reverse-btn {
        width: 40px;
        height: 40px;
    }
    
    .reverse-icon {
        width: 16px;
        height: 16px;
    }
    
    .tab-btn {
        flex: 1 1 100%;
        margin-bottom: 5px;
    }
    
    .tab-content {
        padding: 15px;
    }
    
    .general-section {
        padding: 15px;
    }
}container {
        margin: 10px;
        padding: 20px;
    }
    
    .compatibility-title {
        font-size: 1.6rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .reverse-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
        gap: 8px;
    }
    
    .reverse-icon {
        width: 18px;
        height: 18px;
    }
    
    .reverse-text {
        display: none;
    }
    
    .reverse-btn {
        border-radius: 50%;
        width: 44px;
        height: 44px;
        padding: 0;
        justify-content: center;
    }
    
    .compatibility-result-header {
        padding: 20px;
    }
    
    .compatibility-result-header h1 {
        font-size: 1.4rem;
    }
    
    .tab-navigation {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .tab-btn {
        flex: 1 1 calc(50% - 5px);
        min-width: auto;
        font-size: 0.8rem;
        padding: 10px 12px;
    }
    
    .tab-content {
        padding: 20px;
    }
    
    .tab-pane h2 {
        font-size: 1.2rem;
    }
    
    .tab-pane h3 {
        font-size: 1.1rem;
    }
    
    .qa-results {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .compatibility-title {
        font-size: 1.4rem;
    }
    
    .person-card {
        padding: 20px;
    }
    
    .reverse-btn {
        width: 40px;
        height: 40px;
    }
    
    .reverse-icon {
        width: 16px;
        height: 16px;
    }
    
    .tab-btn {
        flex: 1 1 100%;
        margin-bottom: 5px;
    }
    
    .tab-content {
        padding: 15px;
    }
    
    .general-section {
        padding: 15px;
    }
} Основные стили для формы совместимости */
.zodiac-compatibility-container {
    max-width: 600px;
    margin: 20px auto;
    padding: 30px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.compatibility-title {
    text-align: center;
    color: #333;
    font-size: 2rem;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.compatibility-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

/* Стили для вводного блока */
.intro-text-block {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.intro-content {
    max-width: none;
}

.intro-heading {
    color: #1e293b;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}

.intro-paragraph {
    color: #475569;
    line-height: 1.7;
    font-size: 1rem;
    margin-bottom: 18px;
}

.intro-paragraph.emphasis {
    font-weight: 600;
    color: #334155;
    background: rgba(99, 102, 241, 0.1);
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #6366f1;
}

.intro-paragraph.final {
    font-style: italic;
    color: #64748b;
    text-align: center;
    margin-bottom: 0;
}

.intro-features {
    background: white;
    padding: 25px;
    border-radius: 12px;
    margin: 25px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.features-title {
    color: #1e293b;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.features-list li {
    color: #475569;
    line-height: 1.6;
    margin-bottom: 12px;
    padding-left: 20px;
    position: relative;
}

.features-list li:before {
    content: "✨";
    position: absolute;
    left: 0;
    top: 0;
}

.features-list li strong {
    color: #334155;
}

.intro-closing {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.person-card {
    background: #f8f9fa;
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 15px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.person-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.person-title {
    font-weight: bold;
    margin-bottom: 15px;
    color: #495057;
    font-size: 1.1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 500;
    color: #495057;
    font-size: 0.9rem;
}

.form-group select {
    padding: 12px 15px;
    border: 2px solid #ced4da;
    border-radius: 10px;
    background: white;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Улучшенные стили для кнопки реверса */
.reverse-button-container {
    display: flex;
    justify-content: center;
    margin: 25px 0;
    position: relative;
}

.reverse-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: #ffffff;
    color: #6366f1;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.reverse-btn:hover {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.reverse-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

.reverse-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.reverse-btn:hover .reverse-icon {
    transform: rotate(180deg);
}

.reverse-text {
    font-weight: 600;
    letter-spacing: 0.025em;
}

/* Анимация при клике */
.reverse-animation {
    animation: reverseClick 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.reverse-animation .reverse-icon {
    animation: iconSpin 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes reverseClick {
    0% { 
        transform: scale(1) translateY(-2px); 
    }
    25% { 
        transform: scale(0.95) translateY(-1px);
        background: #4f46e5;
    }
    50% { 
        transform: scale(1.05) translateY(-3px);
        background: #6366f1;
    }
    100% { 
        transform: scale(1) translateY(-2px); 
    }
}

@keyframes iconSpin {
    0% { transform: rotate(0deg); }
    50% { transform: rotate(180deg) scale(1.1); }
    100% { transform: rotate(360deg); }
}

.compatibility-btn {
    width: 100%;
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.compatibility-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.compatibility-btn:active {
    transform: translateY(0);
}

/* Стили для результатов */
#compatibility-result {
    margin-top: 30px;
    animation: fadeInUp 0.5s ease;
}

.compatibility-result-header {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    margin-bottom: 25px;
}

.compatibility-result-header h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.combination-info {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    opacity: 0.95;
}

.description {
    font-size: 1rem;
    opacity: 0.9;
    line-height: 1.5;
}

.gender-specific-results,
.general-results,
.qa-results {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.gender-specific-results h4,
.general-results h4,
.qa-results h4 {
    color: #333;
    font-size: 1.3rem;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
}

.section-item {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.section-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.section-item h5 {
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-item p {
    color: #555;
    line-height: 1.6;
    margin: 0;
}

/* FAQ стили */
.qa-item {
    background: white;
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.qa-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.qa-question {
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    transition: background-color 0.3s ease;
}

.qa-question:hover {
    background: #e9ecef;
}

.qa-question span:first-child {
    font-weight: 600;
    color: #333;
}

.qa-toggle {
    width: 24px;
    height: 24px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: all 0.3s ease;
}

.qa-answer {
    padding: 15px 20px;
    background: white;
}

.qa-answer p {
    color: #555;
    line-height: 1.6;
    margin: 0;
}

/* Загрузка */
.loading-container {
    text-align: center;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 15px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

.loading-container p {
    color: #666;
    font-size: 1.1rem;
    font-weight: 500;
}

/* Ошибки */
.error-container {
    text-align: center;
    padding: 30px;
    background: #f8d7da;
    color: #721c24;
    border-radius: 15px;
    border: 1px solid #f5c6cb;
}

.error-container h4 {
    margin-bottom: 10px;
}

.error-container button {
    margin-top: 15px;
    padding: 10px 20px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.error-container button:hover {
    background: #c82333;
}

/* Анимации */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .zodiac-compatibility-container {
        margin: 10px;
        padding: 20px;
    }
    
    .compatibility-title {
        font-size: 1.6rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .reverse-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
        gap: 8px;
    }
    
    .reverse-icon {
        width: 18px;
        height: 18px;
    }
    
    .reverse-text {
        display: none;
    }
    
    .reverse-btn {
        border-radius: 50%;
        width: 44px;
        height: 44px;
        padding: 0;
        justify-content: center;
    }
    
    .compatibility-result-header {
        padding: 20px;
    }
    
    .compatibility-result-header h3 {
        font-size: 1.4rem;
    }
    
    .gender-specific-results,
    .general-results,
    .qa-results {
        padding: 20px;
    }
    
    .section-item {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .compatibility-title {
        font-size: 1.4rem;
    }
    
    .person-card {
        padding: 20px;
    }
    
    .section-item h5 {
        font-size: 1rem;
    }
    
    .reverse-btn {
        width: 40px;
        height: 40px;
    }
    
    .reverse-icon {
        width: 16px;
        height: 16px;
    }
}