/* Orijinal şriftləri import edirik */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600;700&family=Inter:wght@400;500;600&display=swap');

* {
  box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f0f2ff;
    color: #1a202c;
    line-height: 1.6;
    margin: 0;
    padding: 40px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    max-width: 1000px;
    width: 100%;
    background-image: url('https://www.transparenttextures.com/patterns/cubes.png');
    padding: 20px;
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.form-section {
    flex: 2;
    background: rgba(255, 236, 232, 0.7); 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
}

.logo-box {
    width: 45px;
    height: 45px;
    min-width: 45px;
    background: linear-gradient(45deg, #3b82f6 0%, #50E3C2 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.logo-box span {
    color: white;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
}

header h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.9rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.subtitle {
    font-size: 1rem;
    color: #475569;
    margin-top: -5px;
    margin-bottom: 30px;
}

textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    margin-top: 8px;
    transition: all 0.2s;
    resize: vertical;
}

textarea:focus {
    outline: none;
    border-color: #3b82f6;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

label {
    font-weight: 500;
    margin-top: 20px;
    display: block;
    font-size: 0.95rem;
    color: #334155;
}

.warning-text {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 8px;
    margin-bottom: 0;
}

.tone-selector {
    margin-top: 25px;
}
.tone-label {
    margin-top: 0;
    margin-bottom: 12px;
}
.tones {
    display: flex;
    gap: 15px;
    align-items: center;
}
.tone-option input[type="radio"] {
    display: none;
}
.tone-option label {
    margin-top: 0;
    cursor: pointer;
    padding: 8px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}
.tone-option input[type="radio"]:checked + label {
    background-color: #3b82f6;
    color: white;
    border-color: #3b82f6;
    font-weight: 600;
}
.tone-option label:hover {
    border-color: #3b82f6;
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 30px;
}

#generate-button {
    width: auto;
    padding: 14px 20px;
    background: linear-gradient(90deg, #3b82f6 0%, #2dd4bf 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

#generate-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(59, 130, 246, 0.4);
}
#generate-button:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 0.9rem;
  color: #475569;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #1e293b;
}

.btn-icon { width: 18px; height: 18px; }
#result-area { margin-top: 30px; }
#result-area h2 { font-size: 1.2rem; font-weight: 600; margin-bottom: 10px; }
#output { background-color: white; border: 1px solid #e2e8f0; padding: 15px; border-radius: 8px; margin-top: 5px; font-size: 0.95rem; line-height: 1.7; white-space: pre-wrap; }
#loading-spinner { color: #718096; margin-top: 10px; }

.info-section {
    flex: 1;
    background-color: rgba(238, 242, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.info-section h2 { font-size: 1.4rem; font-weight: 600; margin-top: 0; margin-bottom: 25px; color: #1e293b; }
.info-section ol { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 20px; }
.info-section li { display: flex; align-items: flex-start; gap: 15px; }

.info-section .step-number {
    background-color: #3b82f6;
    color: white;
    border-radius: 50%;
    min-width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 2px 5px rgba(59, 130, 246, 0.3);
}

.info-section p { margin: 0; font-size: 0.95rem; color: #334155; line-height: 1.5; }

.scenario-section {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}
.scenario-title {
    font-weight: 500;
    display: block;
    font-size: 0.95rem;
    color: #334155;
    margin-bottom: 15px;
}
.scenario-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
#refine-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.07);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.scenario-btn,
.refine-btn {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
    color: #475569;
    border: 1px solid #cbd5e1;
    padding: 8px 16px;
    font-size: 0.9rem;
}
.refine-btn {
    padding: 7px 14px;
    font-size: 0.85rem;
}
.scenario-btn:hover,
.refine-btn:hover {
    background: #f1f5f9;
    border-color: #3b82f6;
    color: #1e293b;
}

#saashub-badge {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.07);
    text-align: center;
}
#saashub-badge p {
    font-size: 0.9rem;
    color: #475569;
}

@media (max-width: 992px) {
    body {
        padding: 20px 15px;
        align-items: flex-start;
    }
    .container {
        flex-direction: column;
        gap: 30px;
        padding: 15px;
    }
    .form-section, .info-section {
        padding: 20px;
    }
    header h1 {
        font-size: 1.6rem;
    }
    .subtitle {
        font-size: 0.95rem;
    }
    .tones {
        flex-wrap: wrap;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .form-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }
    #generate-button {
        width: 100%;
    }
    .footer-links {
        justify-content: center;
        padding-top: 5px;
    }
}

/* =============== FEEDBACK MODAL STYLES =============== */

.main-nav {
    position: absolute;
    top: 25px;
    right: 40px;
    z-index: 1001;
}
.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 25px;
    text-decoration: none;
    color: #334155;
    font-weight: 500;
    transition: all 0.3s ease;
}
.nav-link:hover {
    background: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}
.nav-link i {
    width: 18px;
    height: 18px;
}

#feedback-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 20, 40, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.modal-content {
    position: relative;
    max-width: 600px;
    width: 90%;
    z-index: 1001;
}
.modal-close {
    position: absolute;
    top: -15px;
    right: -10px;
    background: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 24px;
    color: #334155;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    line-height: 1;
    transition: transform 0.2s;
    z-index: 1002;
}
.modal-close:hover {
    transform: rotate(90deg);
}

.feedback-section-modal {
    padding: 35px 40px;
    background: #f7f8fc;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}
.feedback-section-modal h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #1e293b;
    margin-top: 0;
    margin-bottom: 10px;
}
.feedback-section-modal p {
    font-size: 1rem;
    color: #475569;
    margin-bottom: 30px;
}
.feedback-section-modal .feedback-category {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
}
.feedback-section-modal .feedback-category label {
    display: inline-block;
    vertical-align: middle;
    margin-top: 0;
    padding: 10px 20px;
    background: white;
    color: #475569;
    border: 1px solid #cbd5e1;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}
.feedback-section-modal .feedback-category input[type="radio"] {
    display: none;
}
.feedback-section-modal .feedback-category input[type="radio"]:checked + label {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}
.feedback-section-modal textarea {
    background-color: white;
    margin-top: 0;
    border-color: #e2e8f0;
}
.feedback-section-modal button {
    padding: 14px 35px;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(90deg, #3b82f6 0%, #2dd4bf 100%);
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}
.feedback-section-modal button:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(59, 130, 246, 0.4);
}

@media (max-width: 992px) {
    .main-nav {
        top: 15px;
        right: 15px;
    }
}

/* --- POPOVER STİLİ (SON VERSİYA) --- */

.email-input-wrapper {
    position: relative;
}

/* Popover-ın özü üçün daha güclü bir selektor istifadə edirik */
body .form-section #tone-compass-popover {
    position: absolute;
    right: 102%;
    top: 50%;
    width: 280px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    padding: 15px 20px;
    z-index: 10;
    opacity: 0;
    transform: translateY(-50%) translateX(10px); 
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none; 
    visibility: hidden;
    display: block; /* Vacibdir: gizli olsa belə yer tutmasın */
}

body .form-section #tone-compass-popover.visible {
    opacity: 1;
    transform: translateY(-50%) translateX(0); 
    visibility: visible;
}

body .form-section #tone-compass-popover.limit-reached {
    background: #fef2f2; 
    border: 1px solid #fecaca;
}

.popover-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

#popover-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

#popover-text {
    margin: 0;
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.5;
}

#popover-text b {
    color: #1e293b;
    font-weight: 600;
    display: block;
    margin-bottom: 3px;
}

.popover-tail {
    position: absolute;
    top: 50%;
    right: -10px; /* Popover-ın sağından kənara çıxır */
    margin-top: -10px;
    width: 0;
    height: 0;
    
    /* Bu 3 sətir üçbucaq (quyruq) yaradır */
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 10px solid white; /* Quyruğun rəngi və istiqaməti */

    transition: border-color 0.3s ease;
    z-index: 11; /* Hər ehtimala qarşı, hər şeyin önündə olmasını təmin edir */
}

body .form-section #tone-compass-popover.limit-reached .popover-tail {
    border-left-color: #fef2f2;
}

/* Mobil versiya üçün popover stilləri (dəyişikliksiz) */
@media (max-width: 992px) {
    body .form-section #tone-compass-popover {
        left: 50%;
        right: auto;
        top: auto;
        bottom: 100%; 
        transform: translateX(-50%) translateY(10px);
        width: 95%;
        margin-bottom: 12px;
    }
    body .form-section #tone-compass-popover.visible {
        transform: translateX(-50%) translateY(0);
    }
    .popover-tail {
        left: 50%;
        right: auto;
        top: 100%; 
        margin-left: -10px;
        border-right: 10px solid transparent;
        border-left: 10px solid transparent;
        border-top: 10px solid white;
    }
    body .form-section #tone-compass-popover.limit-reached .popover-tail {
        border-top-color: #fef2f2;
        border-left-color: transparent;
    }
}