/* ======================================================
   WifeTranslator.ai — Main Stylesheet
   Cache-bust: bump ASSET_VERSION in includes/version.php
   ====================================================== */

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

/* ==================== BODY ==================== */
body {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    color: #2d2d2d;
    background: #ffefe2;
}

/* ==================== CONTAINER ==================== */
.container {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

/* ==================== SHARED COMPONENTS ==================== */

.section-label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #999;
    margin-bottom: 16px;
    text-align: center;
}

.footer {
    text-align: center;
    margin-top: 48px;
    color: #ccc;
    font-size: 0.8rem;
}

.copyright {
    text-align: center;
    margin-top: 16px;
    color: #ccc;
    font-size: 0.75rem;
}

.copyright a {
    color: #ccc;
    text-decoration: none;
}

/* Footer store badges */
.footer-store-badges {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
}

.footer-store-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid #e0d6cc;
    background: rgba(255,255,255,0.5);
    color: #999;
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 600;
    transition: all 0.2s;
}

.footer-store-badge:hover {
    border-color: #26153b;
    color: #26153b;
}

.footer-store-badge svg {
    flex-shrink: 0;
}

.ad-unit-mid {
    margin: 30px auto;
    text-align: center;
    width: 300px;
    max-height: 250px;
    overflow: hidden;
}

/* Share Bar (base) */
.share-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.share-bar .share-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 50%;
    border: 2px solid #eee;
    background: white;
    color: #555;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.share-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Translation Cards (shared: share.php feed + translations.php) */
.translation-card {
    display: block;
    background: white;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-bottom: 14px;
    overflow: hidden;
    transition: box-shadow 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.translation-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.card-summary {
    padding: 18px 20px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.card-personality-badge {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #26153b, #3a2259);
    overflow: hidden;
}

.card-personality-badge img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.card-content {
    flex: 1;
    min-width: 0;
}

.card-name-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.card-personality-name {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #26153b;
}

.card-view-more {
    font-size: 0.7rem;
    font-weight: 600;
    color: #999;
    background: none;
    border: 1px solid #ddd;
    padding: 4px 12px;
    border-radius: 16px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s;
    cursor: pointer;
    text-decoration: none;
}
.card-view-more:hover {
    border-color: #c0392b;
    color: #c0392b;
}

.card-input-text {
    font-size: 0.95rem;
    color: #555;
    font-style: italic;
    margin-bottom: 6px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-input-text::before { content: '\201C'; }
.card-input-text::after { content: '\201D'; }

.card-translation-preview {
    font-size: 0.88rem;
    color: #888;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

.card-date {
    font-size: 0.75rem;
    color: #bbb;
}

.card-tone-votes {
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-tone-badge {
    font-size: 0.75rem;
    color: #aaa;
}

.card-vote-counts {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: #aaa;
}

/* Inline Feed Ad */
.feed-ad-unit {
    margin: 14px 0;
    text-align: center;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
}

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

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

/* ==================== HOME PAGE (index.php) ==================== */

/* 3D Card Flip */
.card-scene {
    width: 100%;
    height: 390px;
    perspective: 800px;
    margin-bottom: 16px;
    position: relative;
}

.card-flip-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 62px;
    z-index: 10;
    border-radius: 14px 14px 0 0;
    cursor: pointer;
    pointer-events: none;
}

.card-flip-overlay.active {
    pointer-events: auto;
}

.card-flipper {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 1.8s cubic-bezier(0.2, 0.8, 0.3, 1);
    transform: rotateY(0deg);
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 14px;
    overflow: hidden;
}

.card-front {
    transform: rotateY(180deg);
}

.card-back {
    background: linear-gradient(135deg, #26153b 0%, #3a2259 50%, #26153b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(38, 21, 59, 0.4);
}

.card-back-design {
    text-align: center;
}

.card-back-title {
    font-size: 1.375rem;
    font-weight: 900;
    letter-spacing: -1px;
    color: white;
    margin-top: 16px;
}

.card-back-subtitle {
    font-weight: 400;
    color: rgba(255,255,255,0.7);
}

/* Personality Card */
.character-section {
    margin-bottom: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.personality-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

.personality-card .card-top {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.personality-card .avatar {
    position: absolute;
    top: -30px;
    left: 0;
    width: 100%;
    height: calc(100% + 30px);
}

.personality-card .avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center top;
    transform: scale(1.25);
    transform-origin: center 25%;
}

@media (min-width: 481px) {
    .card-scene {
        height: 520px;
    }
    .personality-card .avatar {
        top: -180px;
        height: calc(100% + 100px);
    }
    .personality-card .avatar img {
        transform-origin: center top;
    }
    [data-character="becky"] .avatar {
        top: -200px;
        height: calc(100% + 200px);
    }
    [data-character="sofia"] .avatar {
        top: -100px;
        height: calc(100% + 200px);
    }
    [data-character="hockey-mom-brenda"] .avatar {
        top: -100px;
        height: calc(100% + 200px);
    }
}

/* Floating "New Character" pill inside the card */
.new-character-overlay-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 16px;
    background: rgba(0,0,0,0.3);
    border: none;
    color: rgba(255,255,255,0.85);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: background 0.2s;
    line-height: 1;
}

.new-character-overlay-btn:hover {
    background: rgba(0,0,0,0.45);
}

.new-character-overlay-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Info bar: name + label + chevron */
.card-info-bar {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    min-height: 62px;
    flex-shrink: 0;
}

.card-info-text {
    flex: 1;
    text-align: left;
}

.personality-card .name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    padding: 5px 0 0;
}

.personality-card .personality-label {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-top: 2px;
}

.card-info-text .character-description {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.65);
    font-style: italic;
    line-height: 1.3;
    margin-top: 3px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    padding: 5px 10px 10px 0;
}

.personality-card.traits-open .card-info-text .character-description {
    -webkit-line-clamp: unset;
    overflow: visible;
}

/* Share profile button */
.share-profile-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
    margin-right: 6px;
    transition: background 0.2s;
}

.share-profile-btn:hover {
    background: rgba(255,255,255,0.2);
}

/* Chevron toggle button */
.traits-chevron-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
}

.traits-chevron-btn svg {
    transition: transform 0.3s cubic-bezier(0.0, 0.0, 0.2, 1);
}

.traits-chevron-btn.open svg {
    transform: rotate(180deg);
}

/* Collapsible traits panel */
.traits-panel {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s cubic-bezier(0.0, 0.0, 0.2, 1);
    flex-shrink: 0;
}

.traits-panel.open {
    max-height: 120px;
}

.personality-card .traits {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    width: 100%;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding: 14px 8px;
    gap: 0;
}

.personality-card .trait {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 0;
    cursor: pointer;
}

.personality-card .trait.active .trait-score,
.personality-card .trait.active .trait-label {
    color: #FFD93D;
}

.personality-card .trait-score {
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    transition: color 0.2s;
}

.personality-card .trait-label {
    font-size: 0.55rem;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 0;
    line-height: 1;
    white-space: nowrap;
    transition: color 0.2s;
}

.personality-card .trait-description {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.6);
    text-align: center;
    padding: 0 16px 6px;
    line-height: 1.4;
    min-height: 4em;
}


/* Input Area */
.input-section {
    background: white;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    margin-bottom: 32px;
}

.input-section label {
    display: block;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 12px;
    color: #333;
}

.input-section textarea {
    width: 100%;
    min-height: 100px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    padding: 16px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.2s;
    outline: none;
    color: #333;
}

.input-section textarea:focus {
    border-color: #26153b;
}

.input-section textarea::placeholder {
    color: #bbb;
}

.sliders {
    display: flex;
    gap: 24px;
    margin-top: 16px;
    margin-bottom: 4px;
}

.slider-group {
    flex: 1;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.slider-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #555;
}

.slider-value {
    font-size: 0.8rem;
    font-weight: 800;
    color: #26153b;
    min-width: 24px;
    text-align: right;
}

.slider-group input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e8e8e8;
    outline: none;
    cursor: pointer;
}

.slider-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #26153b;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(38, 21, 59, 0.3);
    transition: transform 0.15s;
}

.slider-group input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.slider-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #26153b;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(38, 21, 59, 0.3);
}

.slider-mood {
    font-size: 0.6rem;
    color: #999;
    font-style: italic;
    flex: 1;
    text-align: right;
    margin-right: 6px;
}

.translate-btn {
    display: block;
    width: 100%;
    margin-top: 16px;
    padding: 16px;
    background: #26153b;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.translate-btn:hover {
    background: #3a2259;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(38, 21, 59, 0.3);
}

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

.translate-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loading */
.loading {
    display: none;
    text-align: center;
    padding: 40px;
}

.loading.active {
    display: block;
}

.loading .loading-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    animation: iconPulse 1.2s ease-in-out infinite;
    margin: 0 auto 16px;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
}

.loading p {
    color: #999;
    font-size: 0.95rem;
}

/* Results */
.results {
    display: none;
}

.results.active {
    display: block;
    animation: fadeUp 0.5s ease;
}

/* Home result cards */
.page-home .result-card {
    background: white;
    border-radius: 20px;
    padding: 28px 32px;
    margin-bottom: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.result-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.result-label-row .result-label {
    margin-bottom: 0;
}

.back-to-top-link {
    font-size: 0.8rem;
    font-weight: 500;
    color: #c0392b;
    text-decoration: none;
}

.back-to-top-link:hover {
    text-decoration: underline;
}

.page-home .result-card .result-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 12px;
}

.page-home .result-card.translation .result-label {
    color: #26153b;
}

.page-home .result-card.recommendation .result-label {
    color: #27ae60;
}

.page-home .result-card .result-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #444;
}

.page-home .result-card.translation {
    border-left: 4px solid #26153b;
}

.page-home .result-card.recommendation {
    border-left: 4px solid #27ae60;
}

/* Home Share Bar */
.page-home .share-bar {
    margin-top: 20px;
}

.page-home .share-btn:hover {
    border-color: #26153b;
    color: #26153b;
}

/* Share Link Row */
.share-link-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    justify-content: center;
}

.share-link-row input {
    flex: 1;
    max-width: 280px;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.75rem;
    color: #888;
    font-family: 'Inter', sans-serif;
    background: #fafafa;
    cursor: text;
}

.share-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    background: white;
    color: #555;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
}

.share-link-btn:hover {
    border-color: #26153b;
    color: #26153b;
}

.share-link-btn svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

/* Error */
.error {
    display: none;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 12px;
    padding: 16px 20px;
    color: #26153b;
    margin-bottom: 20px;
    text-align: center;
}

.error.active {
    display: block;
    animation: fadeUp 0.3s ease;
}

/* Credit Counter */
.credit-counter {
    text-align: center;
    font-size: 0.78rem;
    color: #aaa;
    margin-top: 12px;
    margin-bottom: 0;
    min-height: 1.2em;
    transition: color 0.2s;
}

.credit-counter.low {
    color: #e67e22;
    font-weight: 600;
}

.credit-counter.empty {
    color: #26153b;
    font-weight: 600;
}

/* Ad Gate Modal */
.ad-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.ad-modal.active {
    display: flex;
    animation: fadeUp 0.25s ease;
}

.ad-modal-box {
    background: white;
    border-radius: 24px;
    padding: 40px 36px;
    max-width: 380px;
    width: calc(100% - 40px);
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.ad-modal-icon {
    font-size: 2.8rem;
    margin-bottom: 16px;
    line-height: 1;
}

.ad-modal-box h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.ad-modal-box p {
    font-size: 0.9rem;
    color: #777;
    line-height: 1.55;
    margin-bottom: 24px;
}

.ad-watch-btn {
    display: block;
    width: 100%;
    padding: 14px;
    background: #26153b;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
    margin-bottom: 10px;
}

.ad-watch-btn:hover {
    background: #3a2259;
}

.ad-watch-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.ad-cancel-btn {
    background: none;
    border: none;
    color: #bbb;
    font-size: 0.8rem;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    padding: 6px;
    transition: color 0.2s;
}

.ad-cancel-btn:hover {
    color: #999;
}

.ad-loading-state {
    display: none;
    padding: 12px 0 4px;
}

.ad-loading-state .spinner {
    width: 28px;
    height: 28px;
    margin: 0 auto 10px;
}

.ad-loading-state p {
    font-size: 0.8rem;
    color: #bbb;
    margin-bottom: 0;
}

.ad-fallback-container {
    max-width: 300px;
    max-height: 250px;
    overflow: hidden;
    margin: 0 auto 16px;
    border-radius: 8px;
    background: #f5f5f5;
}

/* Home Responsive */
@media (max-width: 768px) {
    .input-section { padding: 20px; }
    .page-home .result-card { padding: 20px 24px; }
}

/* ==================== SHARE PAGE (share.php) ==================== */

/* Character Card */
.character-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 24px;
    padding: 20px;
}

.character-card .card-top-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.character-card .avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    background: #f0e6d6;
    border: 2px solid #f0e6d6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    flex-shrink: 0;
    display: block;
}

.character-card .avatar img,
.character-card .avatar svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.character-card .card-top-text {
    flex: 1;
    min-width: 0;
}

.character-card .character-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
}

.character-card .character-type {
    font-size: 0.65rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.character-card .character-name-link {
    text-decoration: none;
    color: inherit;
}

.character-card .character-name-link:hover .character-name {
    color: #667eea;
}

.character-card .character-details {
    margin-top: 14px;
}

.character-card .character-description {
    font-size: 0.82rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 8px;
}

.character-card .traits-toggle {
    display: inline-block;
    background: none;
    border: none;
    color: #667eea;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 0 4px;
}

.character-card .traits-toggle:hover {
    text-decoration: underline;
}

.character-card .character-traits {
    flex-direction: column;
    gap: 8px;
}

.character-card .share-trait-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
}

.character-card .share-trait-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.character-card .share-trait-value {
    font-size: 0.7rem;
    font-weight: 700;
    color: #333;
}

.character-card .share-trait-bar {
    height: 6px;
    background: #f0e6d6;
    border-radius: 3px;
    overflow: hidden;
}

.character-card .share-trait-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 3px;
    transition: width 0.6s ease;
}

/* Quote */
.quote-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 24px;
}

.quote-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    margin-bottom: 8px;
}

.quote-text {
    font-size: 1.2rem;
    font-style: italic;
    color: #555;
    line-height: 1.6;
}

.quote-text::before { content: '\201C'; }
.quote-text::after { content: '\201D'; }

/* Tone Meters */
.tone-meters {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.tone-meter {
    flex: 1;
    background: white;
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.tone-meter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.tone-meter-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #999;
}

.tone-meter-value {
    font-size: 0.75rem;
    font-weight: 700;
    color: #c0392b;
}

.tone-meter-bar {
    height: 6px;
    background: #f0e6d6;
    border-radius: 3px;
    overflow: hidden;
}

.tone-meter-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, #f39c12, #c0392b);
    transition: width 0.3s ease;
}

.tone-meter-mood {
    font-size: 0.7rem;
    color: #888;
    margin-top: 5px;
    text-align: right;
}

/* Share Result Cards */
.page-share .result-card {
    background: white;
    border-radius: 16px;
    padding: 24px 28px;
    margin-bottom: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.page-share .result-card.translation {
    border-left: 4px solid #c0392b;
}

.page-share .result-card.recommendation {
    border-left: 4px solid #27ae60;
}

.page-share .result-card .result-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    color: #999;
}

.page-share .result-card.translation .result-label { color: #c0392b; }
.page-share .result-card.recommendation .result-label { color: #27ae60; }

.page-share .result-card .result-text {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #444;
}

/* Reaction Bar */
.reaction-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 0 0 24px;
    padding: 18px 24px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.reaction-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #888;
    margin-right: 4px;
}

.reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 2px solid #eee;
    background: white;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: #888;
    transition: all 0.15s ease;
    font-family: inherit;
}

.reaction-btn:hover {
    border-color: #c0392b;
    color: #c0392b;
}

.reaction-btn.active-up {
    border-color: #27ae60;
    background: #f0faf4;
    color: #27ae60;
}

.reaction-btn.active-down {
    border-color: #c0392b;
    background: #fdf2f0;
    color: #c0392b;
}

.reaction-btn .emoji {
    font-size: 1.1rem;
}

/* Share page share bar */
.page-share .share-bar {
    gap: 12px;
    margin: 28px 0;
}

.page-share .share-btn:hover {
    border-color: #c0392b;
    color: #c0392b;
}

.share-url-row {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 460px;
    margin: -12px auto 16px;
}

.share-url-input {
    flex: 1;
    min-width: 0;
    padding: 9px 12px;
    border: 1.5px solid #e8e0d8;
    border-radius: 10px;
    font-size: 0.82rem;
    color: #777;
    background: #fdf8f3;
    font-family: 'Inter', sans-serif;
    outline: none;
    cursor: default;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.share-url-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 9px 14px;
    border-radius: 10px;
    border: 1.5px solid #e8e0d8;
    background: white;
    color: #555;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.share-url-btn:hover {
    border-color: #26153b;
    color: #26153b;
}

.share-url-btn svg {
    width: 14px;
    height: 14px;
}

/* CTA */
.cta {
    text-align: center;
    margin-top: 32px;
}

.cta a {
    display: inline-block;
    padding: 14px 36px;
    background: #c0392b;
    color: white;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: background 0.2s;
}

.cta a:hover {
    background: #a93226;
}

/* 404 */
.not-found {
    text-align: center;
    padding: 80px 20px;
}

.not-found h2 {
    font-size: 2rem;
    color: #c0392b;
    margin-bottom: 12px;
}

.not-found p {
    color: #888;
    margin-bottom: 24px;
}

/* Recent Translations section */
.recent-section {
    margin-top: 48px;
    margin-bottom: 40px;
}

.recent-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #26153b;
    margin-top: 16px;
    margin-bottom: 28px;
    padding-top: 32px;
    border-top: 1px solid #f0e6d6;
}

/* Recent loading spinner */
.recent-loading {
    text-align: center;
    padding: 24px 20px;
    display: none;
}

.recent-loading .spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid #e8e0d8;
    border-top-color: #26153b;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.recent-loading.visible {
    display: block;
}

/* Share page ad unit */
.page-share .ad-unit-mid {
    margin: 24px auto;
}

/* Share page responsive */
@media (max-width: 480px) {
    .page-share .result-card { padding: 20px; }
    .card-summary { padding: 14px 16px; }
}

/* ==================== TRANSLATIONS PAGE (translations.php) ==================== */

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #26153b;
    text-align: center;
    margin-bottom: 8px;
}

.mode-toggle {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
}

.mode-toggle a {
    padding: 8px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
    border: 2px solid #e8e0d8;
    color: #888;
}

.mode-toggle a:hover {
    border-color: #26153b;
    color: #26153b;
}

.mode-toggle a.active {
    background: #26153b;
    border-color: #26153b;
    color: white;
}

/* Search Bar */
.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
}

.search-bar input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e8e0d8;
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    background: white;
    color: #333;
    outline: none;
    transition: border-color 0.2s;
}

.search-bar input:focus {
    border-color: #26153b;
}

.search-bar input::placeholder {
    color: #bbb;
}

.search-bar button {
    padding: 12px 20px;
    background: #26153b;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: background 0.2s;
    white-space: nowrap;
}

.search-bar button:hover {
    background: #3a2259;
}

/* Translations ad unit */
.page-translations .ad-unit-mid {
    margin: 0 auto 24px;
}

/* Results Info */
.results-info {
    text-align: center;
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 16px;
}

/* Loading More Spinner */
.loading-more {
    text-align: center;
    padding: 24px 20px;
    color: #999;
    display: none;
}

.loading-more .spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid #e8e0d8;
    border-top-color: #26153b;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 8px;
}

.loading-more.visible {
    display: block;
}

.end-of-results {
    text-align: center;
    padding: 20px;
    font-size: 0.85rem;
    color: #ccc;
    display: none;
}

.end-of-results.visible {
    display: block;
}

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

.empty-state svg {
    width: 64px;
    height: 64px;
    color: #ddd;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #999;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.9rem;
    color: #bbb;
    max-width: 360px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Translations page loading state */
.page-translations .loading {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    display: block;
}

.page-translations .loading .spinner {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid #e8e0d8;
    border-top-color: #26153b;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 12px;
}

/* Bottom Action Bar */
.bottom-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 28px;
}

.bottom-actions.has-show-more {
    justify-content: space-between;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 24px;
    background: #26153b;
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.2s;
}

.back-link:hover {
    background: #3a2259;
}

.back-link svg {
    width: 16px;
    height: 16px;
}

.show-more-btn {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 12px 24px;
    border: 2px solid #26153b;
    background: white;
    color: #26153b;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
}

.show-more-btn:hover {
    background: #26153b;
    color: white;
}

.show-more-btn.visible {
    display: inline-flex;
}

.show-more-btn svg {
    width: 16px;
    height: 16px;
}

/* Translations responsive */
@media (max-width: 480px) {
    .page-translations .container { padding: 0 14px 40px; }
    .page-title { font-size: 1.25rem; }
    .card-summary { padding: 14px 16px; }
    .card-personality-badge { width: 36px; height: 36px; font-size: 0.7rem; }
}

/* ==================== CONTENT PAGES (terms.php, privacy.php) ==================== */

.page-content .header { margin-bottom: 16px; }

.page-content h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    color: #1a1a2e;
}

.page-content .effective-date {
    color: #999;
    font-size: 0.85rem;
    margin-bottom: 32px;
}

.page-content h2 {
    font-size: 1.1rem;
    margin-top: 28px;
    margin-bottom: 8px;
    color: #1a1a2e;
}

.page-content p,
.page-content li {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 12px;
}

.page-content ul {
    padding-left: 20px;
    margin-bottom: 12px;
}

.page-content a {
    color: #6c63ff;
}

.page-content .back-link {
    display: inline-block;
    margin-top: 32px;
    font-size: 0.85rem;
    background: none;
    border-radius: 0;
    padding: 0;
    color: #6c63ff;
}

.page-content .back-link:hover {
    background: none;
    color: #6c63ff;
}
