/* Chortle v5.3 - Feature Styles */
/* Modals, game demo, auth, friends, and notifications */

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.modal-open {
    opacity: 1;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.modal.modal-open .modal-content {
    transform: translateY(0);
}

.modal-close {
    color: #cbd5e0;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 20px;
    right: 25px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: #2D3748;
}

.modal h2 {
    color: #2D3748;
    text-align: center;
    margin-bottom: 30px;
    font-weight: 600;
    font-size: 1.8em;
}

/* How to Play Steps */
.how-to-play-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.step {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    position: relative;
}

.step:not(:last-child)::after {
    content: "↓";
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    color: #cbd5e0;
    font-size: 16px;
    font-weight: bold;
    z-index: 1;
}

.step-image {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.step-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.step-content h3 {
    color: #2D3748;
    font-weight: 700;
    font-size: 1.3em;
    margin: 0 0 6px 0;
}

.step-content h3::first-letter {
    color: #FE5946;
    font-size: 1.2em;
    font-weight: 800;
}

.step-content p {
    color: #4a5568;
    margin: 0;
    font-size: 1em;
    line-height: 1.5;
}

/* Horizontal layout for wider screens */
@media (min-width: 768px) {
    .modal-content {
        max-width: 700px;
    }

    .how-to-play-steps {
        flex-direction: row;
        gap: 20px;
        align-items: stretch;
    }

    .step {
        flex: 1;
        flex-direction: column;
        text-align: center;
        gap: 12px;
        padding: 20px 16px;
    }

    .step:not(:last-child)::after {
        content: "→";
        bottom: 50%;
        left: auto;
        right: -30px;
        transform: translateY(50%);
        font-size: 18px;
    }

    .step-image {
        align-self: center;
        margin-bottom: 4px;
    }

    .step-content h3 {
        margin-bottom: 8px;
    }
}

/* Game Demo Animation */
.game-demo {
    width: 100%;
    max-width: 500px;
    margin: 0 auto 20px auto;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 20px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    border: 2px solid rgba(254, 89, 70, 0.1);
    box-sizing: border-box;
    overflow: hidden;
}

.sentence {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8em;
    font-weight: 600;
    line-height: 1.5;
    text-align: center !important;
    color: #2D3748;
    opacity: 0;
    position: absolute !important;
    width: calc(100% - 40px) !important;
    left: 20px !important;
    right: 20px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    transition: opacity 0.5s ease;
}

.sentence.active {
    opacity: 1;
}

.sentence .text {
    margin: 0 4px;
}

.sentence .blank {
    display: inline-block;
    margin: 0 4px;
    min-width: 80px;
    text-align: center;
    position: relative;
    color: #cbd5e0;
    font-weight: 400;
}

.sentence .blank.filled {
    color: #FE5946;
    font-weight: 700;
    animation: fillIn 0.6s ease-out;
}

@keyframes sentenceLoop {
    0% { opacity: 0; transform: translateY(10px); }
    4% { opacity: 1; transform: translateY(0); }
    75% { opacity: 1; transform: translateY(0); }
    85% { opacity: 0; transform: translateY(-10px); }
    100% { opacity: 0; transform: translateY(-10px); }
}

/* Typewriter effect */
.sentence .blank.typewriter {
    border-right: 2px solid #FE5946;
    animation: blink 1s infinite;
}

.sentence .blank.typewriter:not(:empty) {
    border-right: none;
    animation: none;
}

@keyframes blink {
    0%, 50% { border-color: #FE5946; }
    51%, 100% { border-color: transparent; }
}

/* Bounce effect when word is complete */
.sentence .blank.bounce {
    animation: bounceIn 0.8s ease-out;
    animation-fill-mode: both;
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0.7;
    }
    20% {
        transform: scale(1.1);
    }
    40% {
        transform: scale(0.9);
    }
    60% {
        transform: scale(1.03);
    }
    80% {
        transform: scale(0.97);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Sparkle effect */
.sentence .blank.sparkle {
    animation: sparkle 1.0s ease-out;
    animation-fill-mode: both;
}

@keyframes sparkle {
    0% {
        text-shadow: none;
    }
    25% {
        text-shadow: 0 0 10px rgba(254, 89, 70, 0.4);
    }
    50% {
        text-shadow: 0 0 15px rgba(254, 89, 70, 0.6);
        transform: scale(1.05);
    }
    100% {
        text-shadow: none;
        transform: scale(1);
    }
}

/* Demo subtitle */
.demo-subtitle {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1em;
    font-weight: 500;
    color: #667eea;
    text-align: center;
    margin: 0 0 15px 0;
    opacity: 0.9;
}

/* Removed duplicate - centering handled by main .intro-content rule above */

.intro-content .primary-btn {
    margin-top: 15px;
    margin-bottom: 16px;
}

.how-to-play-buttons {
    margin-top: 15px;
}

/* Recording Indicator */
.recording-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-family: 'Outfit', sans-serif;
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: rotate(-8deg);
}

.recording-indicator.visible {
    opacity: 1;
    animation: badgePulse 2s ease-in-out infinite;
}

.recording-text {
    font-size: 0.8em;
    font-weight: 600;
    color: #2D3748;
    white-space: nowrap;
}

@keyframes badgePulse {
    0% {
        transform: rotate(-8deg) scale(1);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    50% {
        transform: rotate(-8deg) scale(1.02);
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
    }
    100% {
        transform: rotate(-8deg) scale(1);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
}

/* ========================================
   AUTHENTICATION & PROFILE STYLES
   ======================================== */

/* Auth Buttons in Header */
.header {
    position: relative;
}

.auth-buttons {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 10px;
}

.auth-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    color: #667eea;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 6px;
}

.auth-btn:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Profile Button in Pages */
.page-profile-btn {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    font-weight: 700;
}

.page-profile-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    border-color: #cbd5e0;
}

/* Auth Modal */
.auth-modal-content {
    max-width: 450px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.auth-input {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1em;
    font-family: 'Outfit', sans-serif;
    transition: border-color 0.3s ease;
    background: white;
    color: #2d3748;
}

.auth-input:focus {
    outline: none;
    border-color: #667eea;
}

.auth-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.auth-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.auth-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.auth-error {
    color: #e53e3e;
    font-size: 0.9em;
    margin-top: -10px;
    padding: 8px 12px;
    background: #fff5f5;
    border-radius: 6px;
    border-left: 3px solid #e53e3e;
}

.auth-divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.auth-divider span {
    background: white;
    padding: 0 15px;
    color: #a0aec0;
    font-size: 0.9em;
    position: relative;
    z-index: 1;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e2e8f0;
}

/* Social Auth Buttons */
.social-auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.social-btn:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
    transform: translateY(-2px);
}

.email-btn {
    color: #2D3748;
    border-color: #667eea;
}

.email-btn:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.email-btn .social-icon {
    font-size: 1.2em;
}

.google-btn {
    color: #4285f4;
}

.google-btn .social-icon {
    font-weight: 700;
    font-size: 1.2em;
}

.apple-btn {
    color: #000;
}

.apple-btn .social-icon::before {
    content: '';
    font-size: 1.2em;
}

/* Back link */
.back-link {
    background: none;
    border: none;
    color: #667eea;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 0;
    margin-bottom: 15px;
    text-align: left;
    transition: all 0.2s ease;
}

.back-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Auth Toggle */
.auth-toggle {
    text-align: center;
    margin-top: 20px;
}

.auth-toggle p {
    color: #2D3748;
    font-size: 1.05em;
    font-weight: 500;
}

.auth-toggle a {
    color: #667eea;
    font-weight: 700;
    text-decoration: underline;
    font-size: 1.1em;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
    display: inline-block;
}

.auth-toggle a:hover {
    background: rgba(102, 126, 234, 0.1);
    text-decoration: underline;
    color: #764ba2;
}

/* Guest Mode Link */
.guest-mode {
    text-align: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.guest-mode a {
    color: #a0aec0;
    font-size: 0.9em;
    text-decoration: none;
}

.guest-mode a:hover {
    color: #718096;
    text-decoration: underline;
}

/* Profile Modal */
.profile-modal-content {
    max-width: 500px;
}

.profile-info {
    margin-bottom: 30px;
}

.profile-field {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.profile-field:last-child {
    border-bottom: none;
}

.profile-field label {
    display: block;
    font-size: 0.85em;
    font-weight: 600;
    color: #718096;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-field span {
    font-size: 1.1em;
    color: #2d3748;
    font-weight: 500;
}

.username-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.edit-btn {
    background: #e2e8f0;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: 600;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s ease;
}

.edit-btn:hover {
    background: #cbd5e0;
}

#username-edit-form {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#username-edit-form input {
    flex: 1;
}

#username-edit-form button {
    padding: 8px 16px;
}

.small-btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.small-btn:not(.secondary) {
    background: #667eea;
    color: white;
}

.small-btn.secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.small-btn:hover {
    transform: translateY(-1px);
}

/* Profile Stats */
.profile-stats {
    background: #f7fafc;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.profile-stats h3 {
    margin: 0 0 15px 0;
    color: #2d3748;
    font-size: 1.1em;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.stat-item {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
}

.stat-value {
    font-size: 2em;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.85em;
    color: #718096;
    font-weight: 500;
}

/* =======================
   PHASE 2: FRIENDS SYSTEM
   ======================= */

/* Friends Button */
.page-action-btn {
    position: relative;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.page-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    border-color: #667eea;
}

.page-action-btn .action-icon {
    font-size: 20px;
}

/* Friends Button Badge */
.action-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #fc8181;
    color: white;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    box-shadow: 0 2px 4px rgba(252, 129, 129, 0.3);
}

/* Friends Modal */
.friends-modal-content {
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 30px;
}

.friends-modal-content h2 {
    margin: 0 0 20px 0;
    font-size: 1.8em;
    font-weight: 700;
    color: #2d3748;
}

/* Friends Tabs */
.friends-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.friends-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 12px 16px;
    font-size: 1em;
    font-weight: 600;
    color: #718096;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    position: relative;
}

.friends-tab:hover {
    color: #667eea;
    background: #f7fafc;
}

.friends-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.tab-badge {
    display: inline-block;
    background: #fc8181;
    color: white;
    font-size: 0.75em;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    padding: 0 6px;
    margin-left: 6px;
    line-height: 20px;
}

/* Friends Tab Content */
.friends-tabs-container {
    position: relative;
    min-height: 400px;
}

.friends-tab-content {
    display: none;
}

.friends-tab-content.active {
    display: block;
}

/* Search Section */
.search-section {
    margin-bottom: 20px;
}

.friend-search-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 1em;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    outline: none;
    transition: all 0.2s ease;
    font-family: 'Outfit', sans-serif;
}

.friend-search-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Search Results, Friends List, Requests List */
.search-results,
.friends-list-container,
.requests-list-container {
    min-height: 300px;
}

.users-list,
.friends-list,
.requests-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* User/Friend/Request Cards */
.user-card,
.friend-card,
.request-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.user-card:hover,
.friend-card:hover,
.request-card:hover {
    border-color: #cbd5e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 1.05em;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 2px;
}

.user-username {
    font-size: 0.9em;
    color: #718096;
    margin-bottom: 4px;
}

.user-stats {
    font-size: 0.85em;
    color: #a0aec0;
}

.request-time {
    font-size: 0.85em;
    color: #a0aec0;
    margin-top: 4px;
}

/* Friend Actions */
.user-actions,
.friend-actions,
.request-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* Friend Action Buttons */
.btn-add-friend,
.btn-accept-request,
.btn-decline-request,
.btn-remove-friend,
.btn-friend-status {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-add-friend,
.btn-accept-request {
    background: #667eea;
    color: white;
}

.btn-add-friend:hover,
.btn-accept-request:hover {
    background: #5568d3;
    transform: translateY(-1px);
}

.btn-decline-request,
.btn-remove-friend {
    background: #f7fafc;
    color: #718096;
    border: 1px solid #e2e8f0;
}

.btn-decline-request:hover,
.btn-remove-friend:hover {
    background: #fc8181;
    color: white;
    border-color: #fc8181;
}

.btn-friend-status {
    background: #f7fafc;
    color: #718096;
    cursor: default;
}

.btn-friend-status.accepted {
    background: #48bb78;
    color: white;
}

.btn-friend-status.pending {
    background: #edf2f7;
    color: #a0aec0;
}

/* Button States */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

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

.empty-state p {
    margin: 0 0 8px 0;
    font-size: 1.1em;
}

.empty-state-hint {
    font-size: 0.9em;
    color: #cbd5e0;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: #a0aec0;
    font-size: 1em;
}

/* Error State */
.error {
    text-align: center;
    padding: 40px 20px;
    color: #fc8181;
    font-size: 1em;
}

/* =======================
   PHASE 2: FRIEND SELECTOR (Share Page)
   ======================= */

.friend-selector-section {
    margin-bottom: 25px;
}

.friend-selector-section h3 {
    margin: 0 0 16px 0;
    font-size: 1.4em;
    font-weight: 700;
    color: #2d3748;
    text-align: left;
}

/* Playback friend selector (User B) */
#playback-friend-selector {
    margin-bottom: 25px;
}

#playback-friend-selector h3 {
    margin: 0 0 16px 0;
    font-size: 1.4em;
    font-weight: 700;
    color: #2d3748;
    text-align: left;
}

#playback-send-to-friends-btn {
    width: 100%;
    margin-top: 12px;
}

#playback-send-to-friends-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #cbd5e0;
    color: #718096;
}

.friend-selector-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px;
}

.friend-selector-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 4px;
}

.friend-selector-item:hover {
    background: #f7fafc;
}

.friend-selector-item.selected {
    background: #ebf4ff;
    border: 2px solid #667eea;
}

.friend-selector-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.friend-selector-item.selected .friend-selector-checkbox {
    background: #667eea;
    border-color: #667eea;
}

.friend-selector-checkbox::after {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: 700;
    display: none;
}

.friend-selector-item.selected .friend-selector-checkbox::after {
    display: block;
}

.friend-selector-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
}

.friend-selector-info {
    flex: 1;
    min-width: 0;
}

.friend-selector-name {
    font-size: 1em;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 2px;
}

.friend-selector-username {
    font-size: 0.85em;
    color: #718096;
}

#send-to-friends-btn {
    width: 100%;
    margin-top: 12px;
}

#send-to-friends-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #cbd5e0;
    color: #718096;
}

/* Link share section styling */
.link-share-section {
    margin-top: 25px;
    text-align: center;
}

.share-link-toggle {
    display: inline-block;
    color: #667eea;
    text-decoration: none;
    font-size: 0.95em;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.share-link-toggle:hover {
    background: #f7fafc;
    color: #5568d3;
}

/* =======================
   PHASE 2: NOTIFICATIONS SYSTEM
   ======================= */

/* Notifications Modal */
.notifications-modal-content {
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 30px;
}

.notifications-modal-content h2 {
    margin: 0 0 20px 0;
    font-size: 1.8em;
    font-weight: 700;
    color: #2d3748;
}

/* Notifications Feed Container */
.notifications-feed-container {
    min-height: 400px;
}

.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Notification Cards */
.notification-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: all 0.2s ease;
    position: relative;
}

.notification-card:hover {
    border-color: #cbd5e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.notification-card.unread {
    background: #f0f4ff;
    border-color: #667eea;
}

/* Notification Avatar */
.notification-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
}

/* Notification Content */
.notification-content {
    flex: 1;
    min-width: 0;
    position: relative;
}

.notification-message {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.notification-username {
    font-size: 1em;
    font-weight: 600;
    color: #2d3748;
    margin-right: 4px;
}

.notification-text {
    font-size: 0.95em;
    color: #718096;
}

.notification-status {
    margin-bottom: 8px;
}

.notification-time {
    position: absolute;
    bottom: 8px;
    right: 0;
    font-size: 0.8em;
    color: #a0aec0;
}

/* Notification Actions */
.notification-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
}

.btn-view-chortle {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    background: #667eea;
    color: white;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-view-chortle:hover {
    background: #5568d3;
    transform: translateY(-1px);
}

/* Notification Badge Dot (for unread) */
.notification-badge-dot {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

/* In-App Notification Toast */
.notification-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border: 2px solid #667eea;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    max-width: 350px;
    z-index: 10000;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.notification-toast.show {
    transform: translateX(0);
}

.notification-toast-content {
    flex: 1;
}

.notification-toast-title {
    font-size: 1em;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 4px;
}

.notification-toast-body {
    font-size: 0.9em;
    color: #718096;
}

.notification-toast-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #a0aec0;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s ease;
}

.notification-toast-close:hover {
    color: #2d3748;
}

/* Notification Status Badges */
.notification-status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
    margin-left: 8px;
}

.status-new {
    background: #e3f2fd;
    color: #1976d2;
}

.status-viewed {
    background: #f5f5f5;
    color: #757575;
}

.status-responded {
    background: #e8f5e9;
    color: #388e3c;
}

.status-dismissed {
    background: #fafafa;
    color: #9e9e9e;
}

/* Dismiss Button */
.btn-dismiss-notification {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #cbd5e0;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 10;
}

.btn-dismiss-notification:hover {
    background: #f7fafc;
    color: #718096;
    transform: scale(1.1);
}

/* Dismissed Notification State */
.notification-card.dismissed {
    opacity: 0.6;
    background: #fafafa !important;
    border-color: #e2e8f0 !important;
}

.notification-card.dismissed .notification-avatar {
    opacity: 0.7;
}

.notification-card.dismissed .notification-content {
    opacity: 0.8;
}

.notification-card.dismissed .btn-view-chortle {
    opacity: 0.6;
    pointer-events: none;
}

/* Notification Toast Animation */
@keyframes slideIn {
    from {
        transform: translateX(400px);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(400px);
    }
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .notification-toast {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100px);
    }

    .notification-toast.show {
        transform: translateY(0);
    }

    .notifications-modal-content {
        padding: 20px;
        max-height: 90vh;
    }

    .notification-card {
        padding: 12px;
    }

    .notification-avatar {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}
