/* --- Global Styles --- */
#aist-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px 30px 30px;
    max-width: 900px;
    margin: 40px auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    color: #333;
}

/* --- Tabs Navigation --- */
.aist-tabs {
    display: flex;
    border-bottom: 1px solid #ccc;
    margin-bottom: 25px;
}
.aist-tab-link {
    padding: 12px 20px;
    cursor: pointer;
    background-color: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 16px;
    font-weight: 600;
    color: #555;
    margin-bottom: -1px;
    transition: all 0.2s ease-in-out;
}
.aist-tab-link:hover {
    background-color: #f5f5f5;
    color: #005AEE;
}
.aist-tab-link.active {
    border-bottom-color: #005AEE;
    color: #005AEE;
}
.aist-tab-content {
    display: none;
}
.aist-tab-content.active {
    display: block;
}

/* --- General Form & UI Elements --- */
.aist-tool-header {
    text-align: left;
    margin-bottom: 25px;
}
.aist-tool-header h3 {
    font-size: 24px;
    margin: 0 0 5px 0;
}
.aist-tool-header p {
    font-size: 16px;
    color: #666;
    margin: 0;
}
.aist-form-group {
    margin-bottom: 20px;
}
.aist-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}
input[type="text"],
textarea {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    transition: all 0.2s ease;
}
input[type="text"]:focus {
    border-color: #005AEE;
    box-shadow: 0 0 0 3px rgba(0, 90, 238, 0.15);
    outline: none;
}
.aist-button {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    font-weight: bold;
    background-color: #005AEE;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}
.aist-button:hover {
    background-color: #004ac0;
}
.aist-button-secondary {
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 600;
    background-color: #e9ecef;
    color: #333;
    border: 1px solid #ced4da;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}
.aist-button-secondary:hover {
    background-color: #dee2e6;
}

/* --- Quill Rich Text Editor --- */
#aist-editor-container {
    height: 350px;
    margin-bottom: 15px;
}
.ql-toolbar {
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}
.ql-container {
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
}

/* --- Results Section --- */
#aist-grader-results-wrapper {
    margin-top: 30px;
    border-top: 1px solid #e0e0e0;
    padding-top: 25px;
}
.aist-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.aist-results-header h3 {
    margin: 0;
    font-size: 22px;
}

/* --- Score Cards & Checklist --- */
.aist-score-card {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}
.aist-score-card h3 {
    font-size: 20px;
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}
.aist-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}
.aist-score-card .aist-metric:last-child { border-bottom: none; }
.aist-metric-label { font-weight: 500; color: #444; }
.aist-metric-value { font-weight: 600; color: #222; }
.aist-metric-value.good { color: #2e7d32; }
.aist-metric-value.bad { color: #d32f2f; }
#aist-overall-score-card { text-align: center; }
#aist-overall-score-value { font-size: 60px; font-weight: 700; line-height: 1; }
.aist-checklist {
    list-style-type: none;
    padding: 0;
    margin: 0;
}
.aist-checklist li {
    padding: 8px 0 8px 30px;
    position: relative;
    font-size: 16px;
}
.aist-checklist li::before {
    content: '❌';
    position: absolute;
    left: 0;
    top: 8px;
}
.aist-checklist li.pass {
    color: #2e7d32;
    text-decoration: none;
}
.aist-checklist li.pass::before {
    content: '✅';
}

/* PDF Export Specific Styling */
.pdf-export-mode {
    padding: 20px !important;
    border: none !important;
    box-shadow: none !important;
}

/* --- SERP Preview Tool --- */
.aist-progress-bar-container {
    width: 100%;
    background-color: #e9ecef;
    border-radius: 4px;
    height: 8px;
    margin-top: 5px;
}
.aist-progress-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease, background-color 0.3s ease;
}
small {
    font-size: 12px;
    color: #666;
}
#aist-serp-simulation-wrapper {
    margin-top: 25px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
}
.aist-serp-result {
    font-family: Arial, sans-serif;
    margin-bottom: 25px;
}
.aist-serp-result:last-child {
    margin-bottom: 0;
}
.serp-url {
    font-size: 14px;
    color: #202124;
}
.serp-title {
    font-size: 20px;
    color: #1a0dab;
    text-decoration: none;
    font-weight: 400;
}
.serp-title:hover {
    text-decoration: underline;
}
.serp-description {
    font-size: 14px;
    color: #4d5156;
    line-height: 1.5;
}
.aist-serp-result.yours {
    background-color: #e8f0fe;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #d2e3fc;
}
