/* AI Dictionary Builder Public CSS */

.adb-wrapper {
    max-width: 800px;
    margin: 40px auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #111827;
    /* Darker gray for text */
}

/* Search Container */
.adb-search-container {
    display: flex;
    gap: 12px;
    margin-bottom: 40px;
}

#adb-search-input {
    flex-grow: 1;
    padding: 16px 24px;
    border: 1px solid #e5e7eb;
    /* Softer border */
    border-radius: 16px;
    /* More rounded */
    font-size: 18px;
    font-family: inherit;
    transition: all 0.2s ease;
    outline: none;
    background: #f9fafb;
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.02);
}

#adb-search-input:focus {
    background: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    /* Nice focus ring */
}

#adb-search-input::placeholder {
    color: #9ca3af;
}

#adb-search-btn {
    padding: 0 32px;
    background: #111827;
    /* sleek dark button */
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    font-family: inherit;
}

#adb-search-btn:hover {
    background: #000000;
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

#adb-search-btn:active {
    transform: translateY(0);
}

#adb-search-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

/* Loading Spinner */
#adb-loading {
    text-align: center;
    padding: 60px;
}

.adb-spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid #111827;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Error Message */
#adb-error {
    padding: 20px;
    background: #fef2f2;
    color: #991b1b;
    border-radius: 12px;
    margin-bottom: 30px;
    text-align: center;
    border: 1px solid #fee2e2;
    font-weight: 500;
}

/* Results Card */
#adb-result {
    background: white;
    border-radius: 24px;
    /* Very rounded */
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    /* Deeper, softer shadow */
    overflow: hidden;
    padding: 40px;
    border: 1px solid rgba(0, 0, 0, 0.02);
    /* Subtle border */
}

.adb-header {
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 24px;
    margin-bottom: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.adb-header-left {
    display: flex;
    align-items: baseline;
    gap: 16px;
    flex-wrap: wrap;
}

.adb-word {
    font-size: 48px;
    /* Larger word */
    font-weight: 800;
    /* Extra bold */
    color: #111827;
    margin: 0;
    line-height: 1.1;
    text-transform: capitalize;
}

.adb-phonetic {
    font-size: 20px;
    color: #6b7280;
    font-family: 'Courier New', Courier, monospace;
    font-weight: 400;
}

/* Audio Button */
.adb-audio-btn {
    background: white;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    color: #3b82f6;
    padding: 10px;
    border-radius: 50%;
    /* Circle */
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.adb-audio-btn:hover {
    background-color: #f9fafb;
    border-color: #d1d5db;
    color: #2563eb;
    transform: scale(1.05);
}

/* Meaning Section */
.adb-pos-block {
    margin-bottom: 32px;
}

.adb-pos-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.adb-pos-title {
    font-size: 13px;
    font-weight: 800;
    color: #3b82f6;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.adb-pos-tr {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
}

.adb-def-item {
    margin-bottom: 16px;
    line-height: 1.7;
}

.adb-def-en {
    font-size: 18px;
    color: #111827;
    font-weight: 700;
    /* Bold */
}

.adb-def-tr {
    font-size: 16px;
    color: #4b5563;
    margin-top: 4px;
    font-weight: 300;
    /* Thin */
    font-style: italic;
}

/* Section Dividers */
.adb-section-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin-top: 40px;
    margin-bottom: 20px;
    border-left: 5px solid #3b82f6;
    padding-left: 16px;
    line-height: 1.2;
}

/* Synonyms & Antonyms Lists */
.adb-synonyms-list,
.adb-antonyms-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.adb-pill {
    padding: 6px 14px;
    border-radius: 8px;
    /* Slightly more rounded */
    font-size: 14px;
    font-weight: 600;
    transition: transform 0.1s;
    cursor: default;
}

.adb-pill:hover {
    transform: translateY(-1px);
}

.adb-pill-syn {
    background-color: #ecfdf5;
    color: #047857;
    /* Darker green for text */
    border: 1px solid transparent;
}

.adb-pill-ant {
    background-color: #fef2f2;
    color: #b91c1c;
    /* Darker red for text */
    border: 1px solid transparent;
}

/* Collocations - Compact Grid */
.adb-collocations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.adb-col-item {
    background: #f9fafb;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: all 0.2s;
    font-size: 15px;
}

.adb-col-item:hover {
    background: #ffffff;
    border-color: #e5e7eb;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.adb-col-en {
    font-weight: 700;
    color: #1f2937;
    display: block;
    margin-bottom: 4px;
}

.adb-col-tr {
    font-style: italic;
    font-weight: 300;
    color: #6b7280;
    font-size: 0.9em;
}

/* Examples */
.adb-examples-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.adb-ex-item {
    padding: 0 0 0 20px;
    margin-bottom: 24px;
    border-left: 3px solid #e5e7eb;
}

.adb-ex-en {
    font-size: 17px;
    color: #1f2937;
    font-weight: 700;
    display: block;
    margin-bottom: 6px;
}

.adb-ex-tr {
    font-size: 16px;
    font-style: italic;
    font-weight: 300;
    color: #6b7280;
    display: block;
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .adb-wrapper {
        margin: 10px;
        padding: 0;
    }

    #adb-result {
        padding: 24px;
        border-radius: 20px;
    }

    .adb-word {
        font-size: 32px;
    }

    .adb-search-container {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 20px;
    }

    #adb-search-btn {
        width: 100%;
        padding: 14px;
    }

    .adb-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .adb-header-left {
        width: 100%;
        justify-content: space-between;
    }

    .adb-collocations-grid {
        grid-template-columns: 1fr;
    }
}

/* Level Badge */
.adb-level {
    display: inline-block;
    padding: 4px 10px;
    background-color: #f3f4f6;
    color: #4b5563;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    margin-left: 8px;
    vertical-align: middle;
    border: 1px solid #e5e7eb;
}

/* Word Forms */
.adb-forms-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.adb-form-item {
    display: flex;
    flex-direction: column;
    background: #f9fafb;
    /* Gray-50 to match Collocations */
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s;
}

.adb-form-item:hover {
    background: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.adb-form-word {
    font-weight: 700;
    color: #1f2937;
    /* Gray-900 */
    font-size: 15px;
}

.adb-form-pos {
    font-size: 12px;
    color: #3b82f6;
    /* Blue-500 */
    text-transform: uppercase;
    font-weight: 700;
    margin-top: 2px;
    letter-spacing: 0.5px;
}

.adb-form-tr {
    font-size: 13px;
    color: #6b7280;
    /* Gray-500 */
    font-style: italic;
    margin-top: 2px;
}