/* 65Nation Word of the Day — Literary & Elegant */

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: transparent;
    color: #1a1a1a;
    min-height: 100%;
    padding: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

.wod-widget {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
}

/* ── Loading ── */
.wod-loading {
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e5e7eb;
    border-top-color: #059669;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.wod-loading p {
    color: #6b7280;
    font-size: 0.95rem;
}

/* ── Empty State ── */
.wod-empty {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    margin-bottom: 16px;
    opacity: 0.6;
}

.wod-empty h2 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.4rem;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.wod-empty p {
    color: #6b7280;
    font-size: 1rem;
}

/* ── Word Card ── */
.word-card {
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Header ── */
.wod-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.wod-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    flex-shrink: 0;
}

.wod-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.01em;
}

.wod-date {
    font-size: 0.875rem;
    color: #059669;
    margin-top: 2px;
    font-weight: 500;
}

/* ── Word Hero ── */
.word-hero {
    text-align: center;
    padding: 32px 20px;
    margin-bottom: 24px;
    border: 2px solid #d1fae5;
    border-radius: 16px;
    background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
}

.the-word {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 2.8rem;
    font-weight: 700;
    color: #064e3b;
    text-transform: capitalize;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.pronunciation {
    font-size: 1.1rem;
    color: #6b7280;
    font-style: italic;
    margin-bottom: 12px;
}

.part-of-speech {
    display: inline-block;
    padding: 5px 16px;
    background: #059669;
    border-radius: 20px;
    color: #fff;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── Content Sections ── */
.wod-section {
    margin-bottom: 16px;
    padding: 20px 24px;
    border-radius: 12px;
}

.section-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}

/* Definition */
.definition-section {
    border-left: 4px solid #059669;
    background: #f9fafb;
}

.definition-section .section-label {
    color: #059669;
}

.definition-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #1a1a1a;
}

/* Context */
.context-section {
    background: #f9fafb;
    border-left: 4px solid #6b7280;
}

.context-section .section-label {
    color: #6b7280;
}

.context-text {
    font-size: 1.05rem;
    font-style: italic;
    line-height: 1.7;
    color: #374151;
}

/* Did You Know */
.dyk-section {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 12px;
}

.dyk-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.dyk-section .section-label {
    color: #D97706;
    margin-bottom: 0;
}

.dyk-text {
    font-size: 1rem;
    line-height: 1.7;
    color: #92400e;
}

/* ── Rating ── */
.rating-section {
    text-align: center;
    padding: 24px 0;
    margin-top: 8px;
    border-top: 1px solid #f0f0f0;
}

.rating-prompt {
    color: #6b7280;
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.star-rating {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.star-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #d1d5db;
    transition: color 0.2s, transform 0.2s;
    padding: 6px;
    min-width: 48px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.star-btn svg {
    width: 28px;
    height: 28px;
}

.star-btn:hover,
.star-btn.hover-active {
    color: #fbbf24;
    transform: scale(1.15);
}

.star-btn.active {
    color: #f59e0b;
}

.rating-thanks {
    color: #059669;
    font-weight: 600;
    margin-top: 12px;
    font-size: 0.95rem;
}

/* ── Share Button ── */
.share-section {
    text-align: center;
    margin-top: 8px;
    padding-bottom: 8px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: #059669;
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.share-btn:hover {
    background: #047857;
    transform: translateY(-1px);
}

.share-btn:active {
    transform: translateY(0);
}

/* ── Share Modal ── */
.share-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
}

.share-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.share-modal-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.share-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
}

.share-modal-close:hover {
    color: #1a1a1a;
}

.share-card {
    text-align: center;
    padding: 24px 20px;
    background: linear-gradient(180deg, #f0fdf4 0%, #fff 100%);
    border: 1px solid #d1fae5;
    border-radius: 12px;
    margin-bottom: 20px;
}

.share-card-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 4px;
}

.share-logo-img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.share-brand-name {
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 700;
    font-size: 1rem;
    color: #059669;
}

.share-card-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7280;
    margin-bottom: 2px;
}

.share-card-date {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-bottom: 16px;
}

.share-word-display {
    padding: 16px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    margin-bottom: 16px;
}

.share-word-text {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.6rem;
    color: #064e3b;
    margin-bottom: 8px;
}

.share-meaning-text {
    font-size: 0.9rem;
    color: #374151;
    line-height: 1.5;
}

.share-card-footer {
    font-size: 0.85rem;
    color: #6b7280;
}

.share-card-footer strong {
    color: #059669;
}

/* Share Actions */
.share-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.share-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    color: #1a1a1a;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.share-action-btn:hover {
    border-color: #059669;
    background: #f0fdf4;
}

.share-action-btn.copied {
    border-color: #059669;
    background: #059669;
    color: #fff;
}

.share-social-row {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.share-social-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, opacity 0.2s;
}

.share-social-btn:hover {
    transform: scale(1.08);
}

.share-social-btn:active {
    transform: scale(0.95);
}

.share-social-btn svg {
    width: 20px;
    height: 20px;
}

.share-social-btn.facebook { background: #1877f2; color: #fff; }
.share-social-btn.twitter { background: #000; color: #fff; }
.share-social-btn.whatsapp { background: #25d366; color: #fff; }

/* ── Utilities ── */
.hidden { display: none !important; }

/* ── Responsive ── */
@media (max-width: 640px) {
    body { padding: 16px; }

    .the-word { font-size: 2.2rem; }

    .word-hero { padding: 24px 16px; }

    .wod-section { padding: 16px 18px; }
}

@media (max-width: 400px) {
    body { padding: 12px; }

    .wod-header { gap: 10px; }

    .wod-logo { width: 36px; height: 36px; }

    .wod-title { font-size: 1.1rem; }

    .the-word { font-size: 1.9rem; }

    .word-hero { padding: 20px 14px; margin-bottom: 18px; }

    .wod-section { padding: 14px 16px; margin-bottom: 12px; }

    .definition-text { font-size: 1rem; }

    .share-modal-content { padding: 20px; }
}
