/* ============================================================================
   LISTS PAGE STYLES - GLASSMORPHISM DESIGN
   ============================================================================
   This CSS file provides styling for the lists page with a modern glassmorphism
   design that matches the main site's aesthetic. Uses Quicksand font, purple
   accent colors, and semi-transparent containers with blur effects.
   ============================================================================ */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ============================================================================
   BODY AND CONTAINER STYLES
   ============================================================================ */

/* Main body styling with background image and font */
body {
    font-family: 'Quicksand', sans-serif;
    background-image: url('images/background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-color: #1a1a2e; /* Fallback color */
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

/* Main container with max-width and centering */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ============================================================================
   HEADER SECTION STYLES
   ============================================================================ */

/* Header container with glassmorphism effect */
.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
    background: rgba(0, 0, 0, 0.5); /* Semi-transparent dark background */
    backdrop-filter: blur(20px); /* Glassmorphism blur effect */
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(138, 43, 226, 0.3); /* Purple glow */
}

/* Main header title with purple color and shadow */
.header h1 {
    font-family: 'Quicksand', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #8a2be2; /* Purple accent color */
    text-shadow: 0 4px 8px rgba(138, 43, 226, 0.5);
}

/* Header icon styling */
.header h1 i {
    margin-right: 15px;
    color: #8a2be2;
}

/* Header subtitle styling */
.subtitle {
    font-family: 'Quicksand', sans-serif;
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.9;
    color: white;
}

/* ============================================================================
   SEARCH SECTION STYLES
   ============================================================================ */

/* Search container with glassmorphism styling */
.search-section {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(138, 43, 226, 0.3);
}

/* Search form layout */
.search-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Search input container for positioning icon and button */
.search-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

/* Search icon positioned inside input field */
.search-icon {
    position: absolute;
    left: 20px;
    color: #8a2be2;
    font-size: 18px;
    z-index: 1;
}

/* Main search input field with glassmorphism styling */
.search-input {
    width: 100%;
    padding: 18px 20px 18px 55px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    font-size: 18px;
    font-weight: 400;
    font-family: 'Quicksand', sans-serif;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Search input placeholder text styling */
.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

/* Search input focus state with purple accent */
.search-input:focus {
    outline: none;
    border-color: #8a2be2;
    box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.3);
    transform: translateY(-1px);
}

/* Clear search button (hidden by default) */
.clear-btn {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: none;
}

/* Show clear button when search has content */
.clear-btn.visible {
    display: block;
}

/* Clear button hover state */
.clear-btn:hover {
    background: rgba(138, 43, 226, 0.2);
    color: #8a2be2;
    transform: scale(1.1);
}

/* Container for filter tag buttons */
.filter-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Individual filter tag button styling */
.filter-tag {
    padding: 10px 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Quicksand', sans-serif;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
}

/* Filter tag hover state */
.filter-tag:hover {
    border-color: #8a2be2;
    color: #8a2be2;
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* Active filter tag styling */
.filter-tag.active {
    background: rgba(138, 43, 226, 0.8);
    border-color: #8a2be2;
    color: white;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.4);
}

/* ============================================================================
   SPECIAL FILTER STYLING
   ============================================================================ */

/* Recently Updated filter with cyan outline style */
.filter-tag.recent-filter {
    background: rgba(255, 255, 255, 0.1);
    border-color: #00f5ff;
    color: #00f5ff;
    font-weight: 700;
}

.filter-tag.recent-filter:hover {
    background: rgba(0, 245, 255, 0.1);
    border-color: #00f5ff;
    color: #00f5ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 245, 255, 0.3);
}

.filter-tag.recent-filter.active {
    background: rgba(0, 245, 255, 0.8);
    border-color: #00f5ff;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 245, 255, 0.4);
}

/* NSFW filter tag with red accent instead of purple */
.filter-tag[data-filter="nsfw"] {
    border-color: #ff6b6b;
    color: #ff6b6b;
}

/* NSFW filter tag hover state */
.filter-tag[data-filter="nsfw"]:hover {
    border-color: #ff6b6b;
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

/* Active NSFW filter tag */
.filter-tag[data-filter="nsfw"].active {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    border-color: #ff6b6b;
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

/* ============================================================================
   STATISTICS SECTION STYLES
   ============================================================================ */

/* Statistics container with responsive grid layout */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Individual statistic card with glassmorphism effect */
.stat-card {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 8px 32px rgba(138, 43, 226, 0.3);
    transition: all 0.3s ease;
}

/* Stat card hover effect */
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(138, 43, 226, 0.4);
}

/* Stat card icon styling */
.stat-card i {
    font-size: 2.5rem;
    color: #8a2be2;
    background: rgba(138, 43, 226, 0.2);
    padding: 15px;
    border-radius: 12px;
}

/* Stat content container */
.stat-content {
    display: flex;
    flex-direction: column;
}

/* Large number display for statistics */
.stat-number {
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Quicksand', sans-serif;
    color: white;
    line-height: 1;
}

/* Label text for statistics */
.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    font-family: 'Quicksand', sans-serif;
    margin-top: 5px;
}

/* ============================================================================
   BUTTON STYLES
   ============================================================================ */

/* Base button styling */
.btn {
    padding: 15px 25px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    white-space: nowrap;
}

/* Primary button with blue gradient */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* Secondary button with cyan gradient */
.btn-secondary {
    background: linear-gradient(135deg, #36d1dc 0%, #5b86e5 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(54, 209, 220, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(54, 209, 220, 0.4);
}

/* Danger button with red gradient */
.btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

/* ============================================================================
   LISTS GRID AND CARD STYLES
   ============================================================================ */

/* Responsive grid layout for list cards */
.lists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

/* Individual list card with glassmorphism styling */
.list-card {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(138, 43, 226, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

/* Top accent bar for list cards */
.list-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #8a2be2 0%, #9d4edd 100%);
}

/* ============================================================================
   UPDATED BADGES FOR RECENT CONTENT
   ============================================================================
   Single "UPDATED" badge system for lists updated within 60 days.
   Uses cyan gradient to match the "Recently Updated" filter styling.
   ============================================================================ */

/* Base styling for updated badges */
.list-card .badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    font-family: 'Quicksand', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    animation: badgePulse 2s ease-in-out infinite;
}

/* UPDATED badge for recent content (within 60 days) */
.list-card .badge.updated {
    background: linear-gradient(135deg, #00f5ff 0%, #0099ff 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 245, 255, 0.4);
}

/* Badge pulse animation */
@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

/* Stop animation on hover for better UX */
.list-card:hover .badge {
    animation: none;
    transform: scale(1.02);
}

/* ============================================================================
   SPECIAL NSFW CARD STYLING
   ============================================================================ */

/* NSFW cards get red accent bar instead of purple */
.list-card[data-category="nsfw"]::before {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
}

/* NSFW cards get red category badge */
.list-card[data-category="nsfw"] .list-category {
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
}

/* List card hover effect */
.list-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(138, 43, 226, 0.4);
}

/* ============================================================================
   LIST CARD CONTENT STYLES
   ============================================================================ */

/* Header section of list card */
.list-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

/* List title styling */
.list-title {
    font-size: 1.4rem;
    font-weight: 600;
    font-family: 'Quicksand', sans-serif;
    color: white;
    flex: 1;
    margin-right: 10px;
    word-break: break-word;
}

/* Category badge styling */
.list-category {
    display: inline-block;
    background: rgba(138, 43, 226, 0.3);
    color: #8a2be2;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    font-family: 'Quicksand', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

/* List preview content styling */
.list-preview {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-family: 'Quicksand', sans-serif;
    line-height: 1.6;
}

/* Remove default list styling */
.list-preview ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Individual preview list items */
.list-preview li {
    padding: 6px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    padding-left: 20px;
    transition: all 0.2s ease;
}

/* Purple bullet points for list items */
.list-preview li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #8a2be2;
    font-weight: bold;
}

/* Remove border from last list item */
.list-preview li:last-child {
    border-bottom: none;
}

/* List item hover effect */
.list-preview li:hover {
    color: white;
    padding-left: 25px;
}

/* Footer section of list card */
.list-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Update date styling */
.update-date {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
    font-family: 'Quicksand', sans-serif;
}

/* Item count badge */
.item-count {
    display: inline-block;
    background: rgba(138, 43, 226, 0.3);
    color: #8a2be2;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Quicksand', sans-serif;
}

/* ============================================================================
   MODAL WINDOW STYLES
   ============================================================================ */

/* Modal overlay that covers entire screen */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

/* Main modal content container with glassmorphism */
.modal-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin: 5% auto;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(138, 43, 226, 0.4);
    animation: modalSlideIn 0.3s ease;
}

/* Modal slide-in animation */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modal header with purple background */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(138, 43, 226, 0.8);
    color: white;
    border-radius: 20px 20px 0 0;
}

/* Modal title styling */
.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    font-family: 'Quicksand', sans-serif;
}

/* Modal close button */
.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

/* Close button hover effect */
.close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Modal body content area */
.modal-body {
    padding: 30px;
    color: white;
}

/* Modal metadata section (date and count) */
.modal-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

/* Item count badge in modal */
.item-count-modal {
    background: rgba(138, 43, 226, 0.3);
    color: #8a2be2;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Quicksand', sans-serif;
}

/* Modal search section */
.modal-search {
    margin-bottom: 20px;
}

/* Search input within modal */
.modal-search-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
}

/* Modal search input focus state */
.modal-search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ============================================================================
   MODAL ITEMS LIST STYLES
   ============================================================================ */

/* Container for list items in modal */
.items-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 400px;
    overflow-y: auto;
}

/* Individual items in modal list */
.items-list li {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #1e1e1e;
    margin-bottom: 8px;
    border-radius: 10px;
    border-left: 4px solid #D666F2;
    transition: all 0.2s ease;
    font-size: 14px;
    color: #ffffff;
}

/* Modal list item hover effect */
.items-list li:hover {
    background: #1e1e1e;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    color: #D666F2;
}

/* Highlighted search results in modal */
.items-list li.highlighted {
    background: rgba(102, 126, 234, 0.1);
    border-left-color: #764ba2;
}

/* Modal footer (currently unused but defined) */
.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    background: #f8f9fa;
    border-radius: 0 0 20px 20px;
}

/* ============================================================================
   EMPTY STATE STYLES
   ============================================================================ */

/* Empty state display when no results found */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.8);
}

/* Large icon for empty state */
.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.6;
}

/* Empty state heading */
.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-weight: 600;
}

/* Empty state description text */
.empty-state p {
    font-size: 1.1rem;
    opacity: 0.8;
}

/* ============================================================================
   RESPONSIVE DESIGN - MOBILE AND TABLET
   ============================================================================ */

/* Tablet styles (768px and below) */
@media (max-width: 768px) {
    /* Reduce container padding on mobile */
    .container {
        padding: 15px;
    }
    
    /* Smaller header title on mobile */
    .header h1 {
        font-size: 2rem;
    }
    
    /* Single column layout on mobile */
    .lists-grid {
        grid-template-columns: 1fr;
    }
    
    /* Stack add-list form elements on mobile */
    .add-list-form {
        flex-direction: column;
    }
    
    /* Full width list title input on mobile */
    .list-title-input {
        min-width: 100%;
    }
    
    /* Adjust modal size for mobile */
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    /* Stack modal footer buttons on mobile */
    .modal-footer {
        flex-direction: column;
    }
    
    /* Stack add-item section on mobile */
    .add-item-section {
        flex-direction: column;
    }
    
    /* Adjust badge position for mobile */
    .list-card .badge {
        top: 12px;
        right: 12px;
        font-size: 9px;
        padding: 3px 8px;
    }
}

/* Small mobile styles (480px and below) */
@media (max-width: 480px) {
    /* Even smaller header on small mobile */
    .header h1 {
        font-size: 1.8rem;
    }
    
    /* Smaller subtitle on small mobile */
    .subtitle {
        font-size: 1rem;
    }
    
    /* Reduce padding in sections on small mobile */
    .add-list-section {
        padding: 20px;
    }
    
    /* Reduce list card padding on small mobile */
    .list-card {
        padding: 20px;
    }
}
