/* Text Visibility Fixes for Quest Keeper - Eye-Friendly Colors */

/* Announcement Bell Styles */
.announcement-bell {
    position: relative;
    display: inline-block;
    margin-left: 1rem;
}

.bell-icon {
    color: #d4af37;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.bell-icon:hover {
    background: rgba(212, 175, 55, 0.2);
    color: #f4d03f;
    transform: scale(1.1);
}

.bell-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.announcements-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 450px;
    max-height: 600px;
    background: #2c1810;
    border: 2px solid #8b4513;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    overflow: hidden;
}

.announcements-dropdown.show {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.announcements-header {
    padding: 1rem;
    background: linear-gradient(135deg, #2c1810 0%, #3d2818 100%);
    border-bottom: 1px solid #8b4513;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.announcements-header h3 {
    color: #d4af37;
    margin: 0;
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
}

.mark-all-read {
    background: none;
    border: none;
    color: #d4af37;
    cursor: pointer;
    font-size: 0.8rem;
    text-decoration: underline;
    padding: 0;
}

.mark-all-read:hover {
    color: #f4d03f;
}

.announcements-list {
    max-height: 500px;
    overflow-y: auto;
}

/* Custom scrollbar for announcements list */
.announcements-list::-webkit-scrollbar {
    width: 8px;
}

.announcements-list::-webkit-scrollbar-track {
    background: rgba(139, 69, 19, 0.2);
    border-radius: 4px;
}

.announcements-list::-webkit-scrollbar-thumb {
    background: #d4af37;
    border-radius: 4px;
}

.announcements-list::-webkit-scrollbar-thumb:hover {
    background: #b8941f;
}

.announcement-item {
    padding: 1rem;
    border-bottom: 1px solid rgba(139, 69, 19, 0.3);
    cursor: pointer;
    transition: background 0.2s ease;
}

.announcement-item:hover {
    background: rgba(212, 175, 55, 0.1);
}

.announcement-item.unread {
    background: rgba(212, 175, 55, 0.05);
    border-left: 3px solid #d4af37;
}

.announcement-title {
    font-weight: bold;
    color: #d4af37;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.announcement-type {
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: bold;
}

.announcement-type.update {
    background: rgba(0, 123, 255, 0.2);
    color: #007bff;
}

.announcement-type.maintenance {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

.announcement-type.feature {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
}

.announcement-type.event {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
}

.announcement-type.general {
    background: rgba(108, 117, 125, 0.2);
    color: #6c757d;
}

.announcement-content {
    color: #cccccc;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    max-height: none;
    overflow: visible;
}

.announcement-content.truncated {
    max-height: 60px;
    overflow: hidden;
    position: relative;
}

.announcement-content.truncated::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(transparent, #2c1810);
}

.read-more-btn {
    background: none;
    border: none;
    color: #d4af37;
    cursor: pointer;
    font-size: 0.8rem;
    text-decoration: underline;
    padding: 0;
    margin-top: 0.25rem;
}

.read-more-btn:hover {
    color: #f4d03f;
}

.announcement-meta {
    font-size: 0.8rem;
    color: #999;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.priority-high {
    border-left-color: #ffc107 !important;
}

.priority-critical {
    border-left-color: #dc3545 !important;
    animation: urgentPulse 2s infinite;
}

@keyframes urgentPulse {
    0%, 100% { border-left-width: 3px; }
    50% { border-left-width: 5px; }
}

.no-announcements {
    padding: 2rem;
    text-align: center;
    color: #999;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .announcements-dropdown {
        width: 400px;
        right: -50px;
        max-height: 70vh;
    }
    
    .announcements-list {
        max-height: calc(70vh - 60px);
    }
}

@media (max-width: 480px) {
    .announcements-dropdown {
        width: 350px;
        right: -100px;
        max-height: 80vh;
    }
    
    .announcements-list {
        max-height: calc(80vh - 60px);
    }
    
    .announcement-item {
        padding: 0.75rem;
    }
    
    .announcement-title {
        font-size: 0.9rem;
    }
    
    .announcement-content {
        font-size: 0.85rem;
    }
}

@media (max-width: 400px) {
    .announcements-dropdown {
        width: 320px;
        right: -120px;
    }
}

/* Fix the bright white backgrounds in quest pages */
.quest-header,
.quest-main,
.participants-section,
.quest-details-section,
.guild-info-section {
    background: #1f2937 !important; /* Dark background instead of white */
    color: #e5e7eb !important;
    border: 1px solid rgba(212, 175, 55, 0.3) !important;
}

/* Fix quest content main sections */
.quest-main section {
    background: transparent !important;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2) !important;
    color: #e5e7eb !important;
}

/* Fix quest title and text colors in the new dark backgrounds */
.quest-title,
.quest-main h2,
.participants-section h3,
.quest-details-section h3,
.guild-info-section h3 {
    color: #d4af37 !important; /* Gold for headings */
}

.creator-name,
.participant-name {
    color: #e5e7eb !important; /* Light text for names */
}

.creation-date,
.participant-level,
.join-date,
.participation-info {
    color: #9ca3af !important; /* Muted text for secondary info */
}

/* Fix Quest Details values that are invisible */
.detail-item,
.detail-list .detail-item {
    color: #e5e7eb !important;
}

.detail-item .detail-label {
    color: #9ca3af !important; /* Muted color for labels like "Difficulty:", "Status:" */
}

.detail-item .detail-value {
    color: #cbd5e1 !important; /* Light color for values */
}

/* Fix specific quest detail values */
.quest-details-section .detail-item,
.quest-details-section p,
.quest-details-section div,
.quest-details-section span {
    color: #cbd5e1 !important;
}

/* Fix any remaining quest detail text */
.quest-details-section * {
    color: #cbd5e1 !important;
}

/* Ensure difficulty badges and status indicators are visible */
.difficulty-easy,
.difficulty-medium,
.difficulty-hard,
.difficulty-legendary,
.status-active,
.status-completed,
.status-cancelled {
    color: #1f2937 !important; /* Dark text on colored backgrounds */
    font-weight: 600 !important;
}

/* Fix harsh white background containers to be easier on the eyes */
.quest-participants,
.quest-details,
.quest-sidebar,
.sidebar-section,
.content-card,
.info-card,
.details-card,
.participants-card {
    background: #1f2937 !important; /* Dark gray background instead of white */
    border: 1px solid rgba(212, 175, 55, 0.3) !important;
    border-radius: 8px !important;
}

/* Fix white card backgrounds across the application */
.card,
.quest-card,
.guild-card,
.info-section,
.details-section {
    background: #1f2937 !important; /* Dark background */
    color: #e5e7eb !important;
    border: 1px solid rgba(212, 175, 55, 0.2) !important;
}

/* Fix any white content areas in sidebars or info panels */
.sidebar-content,
.info-panel,
.details-panel,
.quest-info,
.guild-info {
    background: #1f2937 !important;
    color: #e5e7eb !important;
}

/* Fix the main quest content areas with softer, warmer colors */
.quest-description .description-content,
.quest-objectives .objectives-content,
.quest-requirements .requirements-content {
    color: #cbd5e1 !important; /* Softer blue-gray instead of harsh white */
    background: rgba(31, 41, 55, 0.6) !important;
    padding: 16px !important;
    border-radius: 8px !important;
    border: 1px solid rgba(212, 175, 55, 0.2) !important;
    line-height: 1.6 !important;
}

/* Ensure any text within these content areas uses the softer color */
.description-content *,
.objectives-content *,
.requirements-content * {
    color: #cbd5e1 !important; /* Soft blue-gray */
}

/* Fix bright white sections that cause eye strain */
section[style*="background: white"],
section[style*="background-color: white"],
div[style*="background: white"],
div[style*="background-color: white"],
.white-bg,
.bg-white {
    background: #1f2937 !important;
    color: #e5e7eb !important;
}

/* Fix specific blue Discord-style text with warmer colors */
*[style*="color: rgb(70, 82, 196)"],
*[style*="color: #4752c4"],
.quest-description *[style*="color: rgb(70, 82, 196)"],
.guild-description *[style*="color: rgb(70, 82, 196)"],
.quest-objectives *[style*="color: rgb(70, 82, 196)"] {
    color: #d1d5db !important; /* Warm light gray */
    background: rgba(55, 65, 81, 0.8) !important;
    padding: 2px 4px !important;
    border-radius: 3px !important;
    border: 1px solid rgba(212, 175, 55, 0.3) !important;
}

/* Fix blue highlighted backgrounds with softer colors */
*[style*="background-color: rgb(70, 82, 196)"],
*[style*="background-color: #4752c4"],
*[style*="background: rgb(70, 82, 196)"] {
    background: rgba(55, 65, 81, 0.9) !important;
    color: #e2e8f0 !important; /* Soft slate color */
    border: 1px solid rgba(212, 175, 55, 0.4) !important;
    border-radius: 4px !important;
    padding: 3px 6px !important;
}

/* Only target content areas with visibility issues - don't override everything */
.quest-description .problematic-text,
.guild-description .problematic-text,
.quest-objectives .problematic-text {
    color: #cbd5e1 !important;
    background: transparent !important;
}

/* Fix any other problematic blue shades with warmer alternatives */
*[style*="color: #5865f2"],
*[style*="color: rgb(88, 101, 242)"] {
    color: #a5b4fc !important; /* Softer periwinkle blue */
}

/* Ensure readability for inline styled elements in content areas only */
.main-content .quest-description *[style*="color: blue"],
.main-content .guild-description *[style*="color: blue"],
.main-content .quest-objectives *[style*="color: blue"] {
    color: #a5b4fc !important;
}

/* Additional fix for quest content that might be invisible */
.quest-content .quest-main section {
    margin-bottom: 24px !important;
}

.quest-content .quest-main section h2 {
    color: #d4af37 !important; /* Keep the gold color for headings */
    margin-bottom: 12px !important;
}

/* Fix any invisible text in quest sections with warmer colors */
.quest-section p,
.quest-section div,
.quest-section span {
    color: #cbd5e1 !important; /* Soft blue-gray */
}

/* Fix bright white text on dark cards to be more readable */
.card h3,
.card h4,
.quest-card h3,
.quest-card h4,
.guild-card h3,
.guild-card h4 {
    color: #d4af37 !important; /* Gold for headings */
}

.card p,
.card div,
.quest-card p,
.quest-card div,
.guild-card p,
.guild-card div {
    color: #cbd5e1 !important; /* Soft text color */
}

/* Fix selection highlighting to be warmer */
::selection {
    background: rgba(212, 175, 55, 0.8) !important;
    color: #1f2937 !important;
}

/* Notification System - Beautiful centered notifications */
.notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    min-width: 300px;
    max-width: 500px;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    animation: notificationSlideIn 0.3s ease-out;
    transition: all 0.3s ease;
}

/* Success notifications */
.notification-success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.95), rgba(21, 128, 61, 0.95));
    border: 1px solid rgba(34, 197, 94, 0.6);
    color: #ffffff;
}

.notification-success i {
    color: #ffffff;
    font-size: 18px;
}

/* Error notifications */
.notification-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.95), rgba(185, 28, 28, 0.95));
    border: 1px solid rgba(239, 68, 68, 0.6);
    color: #ffffff;
}

.notification-error i {
    color: #ffffff;
    font-size: 18px;
}

/* Info notifications */
.notification-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.95), rgba(29, 78, 216, 0.95));
    border: 1px solid rgba(59, 130, 246, 0.6);
    color: #ffffff;
}

.notification-info i {
    color: #ffffff;
    font-size: 18px;
}

/* Warning notifications */
.notification-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.95), rgba(180, 83, 9, 0.95));
    border: 1px solid rgba(245, 158, 11, 0.6);
    color: #ffffff;
}

.notification-warning i {
    color: #ffffff;
    font-size: 18px;
}

/* Notification text */
.notification span {
    flex: 1;
    line-height: 1.4;
}

/* Close button */
.notification-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* Animation for notification appearance */
@keyframes notificationSlideIn {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Animation for notification removal */
.notification.fade-out {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
    pointer-events: none;
}

/* Multiple notifications stacking */
.notification:nth-child(n+2) {
    margin-top: 60px;
}

/* Responsive design for notifications */
@media (max-width: 768px) {
    .notification {
        left: 10px;
        right: 10px;
        transform: none;
        min-width: auto;
        max-width: none;
    }
    
    .notification:nth-child(n+2) {
        margin-top: 70px;
    }
}

/* Enhanced notification container for multiple notifications */
.notifications-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    pointer-events: none;
}

.notifications-container .notification {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    margin-bottom: 10px;
    pointer-events: all;
}

@media (max-width: 768px) {
    .notifications-container {
        left: 10px;
        right: 10px;
        transform: none;
        width: calc(100% - 20px);
    }
}

/* Quest Completion Celebration Message */
.completion-celebration {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    border: 1px solid #059669 !important;
    color: white !important;
    padding: 20px !important;
    margin-bottom: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.3);
}

.celebration-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.celebration-content i {
    font-size: 2rem;
    color: #fbbf24;
    animation: celebrationPulse 2s infinite;
}

.celebration-content h3 {
    color: white !important;
    margin: 0 0 4px 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.celebration-content p {
    color: rgba(255, 255, 255, 0.9) !important;
    margin: 0;
    font-size: 14px;
}

@keyframes celebrationPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@media (max-width: 768px) {
    .celebration-content {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .celebration-content i {
        font-size: 2.5rem;
    }
}

/* Quest Deletion Notification Message */
.deletion-notification {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    border: 1px solid #d97706 !important;
    color: white !important;
    padding: 20px !important;
    margin-bottom: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(245, 158, 11, 0.3);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.notification-content i {
    font-size: 2rem;
    color: #fef3c7;
    animation: shieldPulse 2s infinite;
}

.notification-content h3 {
    color: white !important;
    margin: 0 0 4px 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.notification-content p {
    color: rgba(255, 255, 255, 0.9) !important;
    margin: 0;
    font-size: 14px;
}

@keyframes shieldPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@media (max-width: 768px) {
    .notification-content {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .notification-content i {
        font-size: 2.5rem;
    }
}

/* Danger Button Styling for Delete Actions */
.btn-danger {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    border: 1px solid #dc2626;
    color: white;
    transition: all 0.2s ease;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #b91c1c, #991b1b);
    border-color: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 38, 38, 0.3);
}

.btn-danger:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.3);
}

.btn-danger:disabled {
    background: #9ca3af;
    border-color: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
