:root {
    --bg-color: #0a0e1a;
    --text-color: #e0e0e0;
    --card-bg: #1a1f2e;
    --border-color: #2a3441;
    --accent-color: #00bfff; /* Electric Blue */
    --accent-hover: #0099ff;
    --accent-purple: #9d4edd; /* Purple accent */
    --accent-purple-hover: #7b2cbf;
    --success-bg: #1a3a2a;
    --success-border: #2a5a3a;
    --success-text: #90ff90;
    --error-bg: #3a1a1a;
    --error-border: #5a2a2a;
    --error-text: #ff9090;
    --input-bg: #1a1f2e;
    --input-border: #2a3441;
    --button-bg: var(--accent-color);
    --button-hover-bg: var(--accent-hover);
    --link-color: var(--accent-color);
    --heading-color: #ffffff;
}

/* Keyframe Animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(0, 191, 255, 0.3), 0 0 10px rgba(0, 191, 255, 0.2);
    }
    50% {
        box-shadow: 0 0 10px rgba(0, 191, 255, 0.5), 0 0 20px rgba(0, 191, 255, 0.3), 0 0 30px rgba(157, 78, 221, 0.2);
    }
}

@keyframes glow-purple {
    0%, 100% {
        box-shadow: 0 0 5px rgba(157, 78, 221, 0.3), 0 0 10px rgba(157, 78, 221, 0.2);
    }
    50% {
        box-shadow: 0 0 10px rgba(157, 78, 221, 0.5), 0 0 20px rgba(157, 78, 221, 0.3);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
}

html {
    overflow-x: hidden; /* Prevent horizontal scrolling */
    width: 100%;
    max-width: 100vw; /* Ensure html doesn't exceed viewport width */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0; /* Remove body padding, add to container */
    background-color: var(--bg-color); /* Fallback background */
    color: var(--text-color);
    position: relative; /* Needed for z-index context */
    min-height: 100vh; /* Ensure body takes at least full viewport height */
    overflow-x: hidden; /* Prevent horizontal scrolling */
    width: 100%;
    max-width: 100vw; /* Ensure body doesn't exceed viewport width */
}

/* Background Video Styles */
.video-background-container {
    position: fixed; /* Fix position relative to viewport */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2; /* Place behind all content */
    overflow: hidden; /* Hide parts of video outside container */
}

#background-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%); /* Center the video */
    object-fit: cover; /* Cover the area, cropping if needed */
    z-index: -2;
}

/* Overlay to darken video for text readability - REMOVED */
/*
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.65); 
    z-index: -1; 
}
*/

/* Ensure content stays above video */
.main-nav, .container {
     position: relative; /* Create stacking context */
     z-index: 1; /* Ensure content is above overlay/video */
}

/* Navigation Bar */
.main-nav {
    /* background-color: var(--card-bg); */ /* Remove or make transparent? */
    background-color: rgba(42, 42, 42, 0.8); /* Semi-transparent background */
    border-bottom: 1px solid var(--border-color);
    padding: 0.5em 1em;
    margin-bottom: 2em;
    position: relative;
    z-index: 100;
}

.nav-container {
    max-width: 1400px; /* Match container max-width */
    margin: 0 auto;
    display: flex;
    justify-content: space-between; /* Space between brand and links */
    align-items: center;
    position: relative;
    padding: 0 2em; /* Add horizontal padding */
}

@media (max-width: 768px) {
    .nav-container {
        max-width: 100%;
        justify-content: space-between;
        padding: 0 0.5em;
    }
}

.nav-brand {
    color: var(--heading-color);
    text-decoration: none;
    font-size: 1.3em;
    font-weight: bold;
    display: flex;
    align-items: center;
}
.nav-logo {
    height: 90px;
    width: auto;
}

@media (max-width: 768px) {
    .nav-logo {
        height: 60px;
    }
}

/* Hamburger Menu Button */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: relative;
}

.nav-hamburger span {
    width: 100%;
    height: 3px;
    background-color: var(--accent-color);
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.nav-hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.nav-hamburger.active span:nth-child(2) {
    opacity: 0;
}

.nav-hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

@media (max-width: 768px) {
    .nav-hamburger {
        display: flex;
    }
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5em;
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: linear-gradient(135deg, rgba(26, 31, 46, 0.98), rgba(20, 25, 38, 0.98));
        backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: flex-start;
        padding: 80px 2em 2em 2em;
        gap: 0;
        transition: right 0.3s ease;
        z-index: 1000;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
        border-left: 1px solid rgba(0, 191, 255, 0.3);
        overflow-y: auto;
    }
    
    .nav-links.mobile-open {
        right: 0;
    }
    
    /* Close menu overlay */
    .nav-links.mobile-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        max-width: 100vw;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }
}

.nav-links a {
    color: var(--link-color);
    text-decoration: none;
    font-size: 1em;
    transition: color 0.2s ease;
    padding: 0.5em 0;
}

.nav-links a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

@media (max-width: 768px) {
    .nav-links a {
        width: 100%;
        padding: 1em 0;
        border-bottom: 1px solid rgba(0, 191, 255, 0.1);
        font-size: 1.1em;
    }
    
    .nav-links a:last-child {
        border-bottom: none;
    }
}

.nav-user {
    margin-right: 1.5em;
    color: var(--text-color);
}

@media (max-width: 768px) {
    .nav-user {
        margin-right: 0;
        margin-bottom: 0.5em;
    }
}

/* Main Container */
.container {
    width: 100%;
    max-width: 1400px; /* Increased max width for desktop */
    margin: 0 auto; /* Center container */
    padding: 0 2em 2em 2em; /* Increased horizontal padding */
    box-sizing: border-box;
    background-color: transparent; /* Ensure container isn't opaque */
}

/* Responsive container padding */
@media (max-width: 768px) {
    .container {
        max-width: 100%;
        width: 100%;
        padding: 0 0.5em 2em 0.5em;
        box-sizing: border-box;
        overflow-x: hidden; /* Prevent horizontal overflow */
    }
}

h1, h2, h3 {
    color: var(--heading-color);
    margin-bottom: 0.75em;
}

/* Desktop: left-align headings, Mobile: center-align */
h1, h2, h3 {
    text-align: left;
}

@media (max-width: 768px) {
    h1, h2, h3 {
        text-align: center;
    }
}

h1 {
    margin-bottom: 1em;
    font-size: 2.2em;
}

h2 {
    font-size: 1.8em;
}

h3 {
    font-size: 1.4em;
}

/* Mobile: Reduce heading sizes to prevent wrapping */
@media (max-width: 768px) {
    h1 {
        font-size: 1.6em;
        line-height: 1.3;
    }
    
    h2 {
        font-size: 1.4em;
        line-height: 1.3;
    }
    
    h3 {
        font-size: 1.2em;
        line-height: 1.3;
    }
}

.section {
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.9), rgba(20, 25, 38, 0.9));
    padding: 2em; /* Increased padding */
    margin-bottom: 2em;
    border-radius: 12px; /* More rounded corners */
    border: 1px solid rgba(0, 191, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 191, 255, 0.1);
    transition: all 0.3s ease;
    animation: float 6s ease-in-out infinite;
}

.section:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 191, 255, 0.2), 0 0 40px rgba(157, 78, 221, 0.1);
    border-color: rgba(0, 191, 255, 0.4);
    animation: float 4s ease-in-out infinite;
}

@media (max-width: 768px) {
    .section {
        padding: 1.2em;
        border-radius: 8px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        margin-left: 0;
        margin-right: 0;
    }
}

/* Form Layout - Desktop uses more space */
/* Search Section - Centered Layout */
.search-section {
    text-align: center;
}

.search-section h2 {
    text-align: center !important;
    margin-bottom: 1.5em;
}

.search-section form,
.subscription-section form,
.rss-subscription-section form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1em;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.search-section form label {
    text-align: center !important;
    display: block;
    width: 100%;
}

.search-section form select {
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.95), rgba(20, 25, 38, 0.95));
    border: 2px solid rgba(0, 191, 255, 0.4);
    border-radius: 8px;
    color: var(--text-color);
    padding: 0.85em 1em;
    font-size: 16px;
    min-height: 48px;
    width: 100%;
    box-sizing: border-box;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2300bfff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1em center;
    background-size: 12px;
    padding-right: 2.5em;
    box-shadow: 0 0 10px rgba(0, 191, 255, 0.2), inset 0 0 10px rgba(157, 78, 221, 0.1);
    animation: glow 3s ease-in-out infinite;
    margin-bottom: 0.5em;
}

.search-section form select:hover {
    border-color: rgba(0, 191, 255, 0.7);
    box-shadow: 0 0 15px rgba(0, 191, 255, 0.4), 0 0 25px rgba(157, 78, 221, 0.2), inset 0 0 15px rgba(157, 78, 221, 0.15);
    animation: glow 1.5s ease-in-out infinite;
    transform: translateY(-1px);
}

.search-section form select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(0, 191, 255, 0.5), 0 0 30px rgba(157, 78, 221, 0.3), inset 0 0 20px rgba(157, 78, 221, 0.2);
    animation: glow 1s ease-in-out infinite;
}

.search-section form input[type="url"],
.search-section form input[type="text"] {
    width: 100%;
    text-align: center;
}

.search-section form button {
    justify-self: center;
    margin-top: 0.5em;
}

.search-section #search-results {
    text-align: center;
    margin-top: 2em;
}

.search-section #search-results h3 {
    text-align: center !important;
    margin-bottom: 1em;
}

.search-section #results-list {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

@media (min-width: 1024px) {
    .search-section form {
        grid-template-columns: 1fr;
        gap: 1.5em;
        max-width: 600px;
    }
    
    .search-section form label {
        grid-column: 1 / -1;
        text-align: center !important;
    }
    
    .search-section form input[type="url"],
    .search-section form input[type="text"] {
        grid-column: 1 / -1;
        text-align: center;
    }
    
    .search-section form button {
        grid-column: 1 / -1;
        justify-self: center;
        max-width: 200px;
    }
}

label {
    display: block;
    margin-bottom: 0.5em;
    font-weight: 600; /* Slightly bolder */
    font-size: 0.95em;
}

/* General Select/Dropdown Styling - Electric Theme */
select {
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.95), rgba(20, 25, 38, 0.95));
    border: 2px solid rgba(0, 191, 255, 0.4);
    border-radius: 8px;
    color: var(--text-color);
    padding: 0.85em 1em;
    font-size: 16px;
    min-height: 48px;
    width: 100%;
    box-sizing: border-box;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2300bfff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1em center;
    background-size: 12px;
    padding-right: 2.5em;
    box-shadow: 0 0 10px rgba(0, 191, 255, 0.2), inset 0 0 10px rgba(157, 78, 221, 0.1);
    animation: glow 3s ease-in-out infinite;
    margin-bottom: 1em;
}

select:hover {
    border-color: rgba(0, 191, 255, 0.7);
    box-shadow: 0 0 15px rgba(0, 191, 255, 0.4), 0 0 25px rgba(157, 78, 221, 0.2), inset 0 0 15px rgba(157, 78, 221, 0.15);
    animation: glow 1.5s ease-in-out infinite;
    transform: translateY(-1px);
}

select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(0, 191, 255, 0.5), 0 0 30px rgba(157, 78, 221, 0.3), inset 0 0 20px rgba(157, 78, 221, 0.2);
    animation: glow 1s ease-in-out infinite;
}

select option {
    background-color: var(--card-bg);
    color: var(--text-color);
    padding: 0.75em 1em;
    border: none;
}

select option:hover,
select option:checked {
    background: linear-gradient(135deg, rgba(0, 191, 255, 0.2), rgba(157, 78, 221, 0.15));
    color: var(--accent-color);
}

input[type="text"],
input[type="url"],
input[type="password"] {
    width: 100%;
    padding: 0.85em 1em; /* Better padding */
    margin-bottom: 1em;
    border: 1px solid var(--input-border);
    background-color: var(--input-bg);
    color: var(--text-color);
    border-radius: 6px; /* More rounded */
    box-sizing: border-box;
    font-size: 16px; /* Prevent iOS zoom - must be 16px or larger */
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
    -webkit-tap-highlight-color: rgba(0, 191, 255, 0.3);
    /* Allow context menu for paste on mobile - don't use manipulation */
    -webkit-touch-callout: default;
    -webkit-user-callout: default;
    /* Only use manipulation for non-input elements, not for text inputs */
}

@media (max-width: 768px) {
    input[type="text"],
    input[type="url"],
    input[type="password"] {
        font-size: 16px; /* Prevent iOS zoom */
        padding: 1em;
        margin-bottom: 1.2em;
        /* Better touch targets */
        min-height: 44px;
        /* Enhanced mobile paste support */
        -webkit-user-select: text !important;
        user-select: text !important;
        -webkit-tap-highlight-color: rgba(0, 191, 255, 0.4) !important;
        /* Prevent input from losing focus during paste */
        pointer-events: auto;
        -webkit-touch-callout: default;
        /* Allow context menu - don't use touch-action: manipulation */
        touch-action: auto !important;
    }
    
    /* Ensure paste menu stays visible on iOS */
    input[type="text"]:focus,
    input[type="url"]:focus,
    input[type="password"]:focus {
        -webkit-user-select: text !important;
        user-select: text !important;
        -webkit-touch-callout: default;
    }
}

input[type="text"]:focus,
input[type="url"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 191, 255, 0.2), 0 0 15px rgba(0, 191, 255, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

button[type="submit"] {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: white;
    padding: 0.9em 2em; /* Better padding */
    border: none;
    border-radius: 6px; /* More rounded */
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 191, 255, 0.4);
    animation: glow 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

button[type="submit"]:hover {
    background: linear-gradient(135deg, var(--accent-hover), var(--accent-color));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 191, 255, 0.6), 0 0 30px rgba(157, 78, 221, 0.3);
    animation: glow 1.5s ease-in-out infinite;
}

button[type="submit"]:active {
    transform: translateY(0);
    animation: none;
}

/* Paste Button Styling */
.paste-button {
    background: linear-gradient(135deg, rgba(157, 78, 221, 0.8), rgba(0, 191, 255, 0.8));
    color: white;
    border: 2px solid rgba(0, 191, 255, 0.5);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(157, 78, 221, 0.4);
    animation: glow-purple 3s ease-in-out infinite;
    white-space: nowrap;
    flex-shrink: 0;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    line-height: 1.5;
    margin: 0;
    vertical-align: middle;
}

/* Ensure YouTube URL input matches paste button height */
#youtube_url {
    height: 48px !important;
    border: 2px solid var(--input-border) !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    vertical-align: middle !important;
}

.paste-button:hover {
    background: linear-gradient(135deg, rgba(0, 191, 255, 0.9), rgba(157, 78, 221, 0.9));
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(157, 78, 221, 0.6), 0 0 25px rgba(0, 191, 255, 0.4);
    animation: glow-purple 1.5s ease-in-out infinite;
}

.paste-button:active {
    transform: translateY(0);
    animation: none;
}

@media (max-width: 768px) {
    .paste-button {
        font-size: 0.85em;
        padding: 0.9em 1em !important;
        min-height: 44px; /* Better touch target */
    }
}

hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 2.5em 0;
}

/* Search Tabs */
.search-tabs {
    display: flex;
    gap: 0.5em;
    margin-bottom: 2em;
    border-bottom: 2px solid rgba(0, 191, 255, 0.2);
    padding-bottom: 0.5em;
}

.search-tab-button {
    padding: 0.75em 1.5em;
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.6), rgba(20, 25, 38, 0.6));
    border: 1px solid rgba(0, 191, 255, 0.2);
    border-radius: 8px 8px 0 0;
    color: var(--text-color);
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: none;
    position: relative;
    top: 2px;
}

.search-tab-button:hover {
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.8), rgba(20, 25, 38, 0.8));
    border-color: rgba(0, 191, 255, 0.4);
    color: var(--accent-color);
    transform: translateY(-2px);
}

.search-tab-button.active {
    background: linear-gradient(135deg, rgba(0, 191, 255, 0.2), rgba(157, 78, 221, 0.1));
    border-color: var(--accent-color);
    color: var(--accent-color);
    border-bottom: 2px solid var(--bg-color);
    box-shadow: 0 4px 12px rgba(0, 191, 255, 0.2), 0 0 20px rgba(0, 191, 255, 0.1);
    animation: pulse 2s ease-in-out infinite;
}

/* Premium Tab - Magical Sparkle Effect */
.search-tab-button-premium {
    position: relative;
    overflow: visible;
    background: linear-gradient(135deg, rgba(157, 78, 221, 0.3), rgba(0, 191, 255, 0.2)) !important;
    border-color: rgba(157, 78, 221, 0.5) !important;
    color: #fff !important;
    text-shadow: 0 0 10px rgba(157, 78, 221, 0.8), 0 0 20px rgba(0, 191, 255, 0.6);
    animation: sparkle 3s ease-in-out infinite, glow-premium-tab 2s ease-in-out infinite !important;
}

.search-tab-button-premium::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        rgba(157, 78, 221, 0.5), 
        rgba(0, 191, 255, 0.5), 
        rgba(157, 78, 221, 0.5), 
        rgba(0, 191, 255, 0.5));
    background-size: 400% 400%;
    border-radius: 8px;
    z-index: -1;
    animation: sparkle-border 3s ease infinite;
    opacity: 0.8;
}

.search-tab-button-premium::after {
    content: '✨';
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 0.8em;
    animation: sparkle-float 2s ease-in-out infinite;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.search-tab-button-premium:hover {
    background: linear-gradient(135deg, rgba(157, 78, 221, 0.5), rgba(0, 191, 255, 0.4)) !important;
    border-color: rgba(157, 78, 221, 0.8) !important;
    box-shadow: 0 0 30px rgba(157, 78, 221, 0.6), 0 0 50px rgba(0, 191, 255, 0.4), 0 0 70px rgba(157, 78, 221, 0.3) !important;
    transform: translateY(-3px) scale(1.05);
    animation: sparkle 1.5s ease-in-out infinite, glow-premium-tab 1s ease-in-out infinite !important;
}

.search-tab-button-premium.active {
    background: linear-gradient(135deg, rgba(157, 78, 221, 0.4), rgba(0, 191, 255, 0.3)) !important;
    border-color: var(--accent-purple) !important;
    color: #fff !important;
    border-bottom: 2px solid var(--bg-color);
    box-shadow: 0 4px 20px rgba(157, 78, 221, 0.5), 
                0 0 30px rgba(0, 191, 255, 0.4), 
                0 0 50px rgba(157, 78, 221, 0.3),
                inset 0 0 20px rgba(157, 78, 221, 0.2) !important;
    animation: sparkle 1s ease-in-out infinite, glow-premium-tab 0.8s ease-in-out infinite !important;
    text-shadow: 0 0 15px rgba(157, 78, 221, 1), 0 0 25px rgba(0, 191, 255, 0.8), 0 0 35px rgba(157, 78, 221, 0.6);
}

@keyframes sparkle {
    0%, 100% {
        box-shadow: 0 0 10px rgba(157, 78, 221, 0.4), 0 0 20px rgba(0, 191, 255, 0.3);
    }
    25% {
        box-shadow: 0 0 20px rgba(157, 78, 221, 0.6), 0 0 40px rgba(0, 191, 255, 0.5), 0 0 60px rgba(157, 78, 221, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(0, 191, 255, 0.6), 0 0 50px rgba(157, 78, 221, 0.5), 0 0 70px rgba(0, 191, 255, 0.3);
    }
    75% {
        box-shadow: 0 0 20px rgba(157, 78, 221, 0.6), 0 0 40px rgba(0, 191, 255, 0.5), 0 0 60px rgba(157, 78, 221, 0.3);
    }
}

@keyframes glow-premium-tab {
    0%, 100% {
        text-shadow: 0 0 10px rgba(157, 78, 221, 0.8), 0 0 20px rgba(0, 191, 255, 0.6);
    }
    50% {
        text-shadow: 0 0 20px rgba(157, 78, 221, 1), 0 0 30px rgba(0, 191, 255, 0.8), 0 0 40px rgba(157, 78, 221, 0.6);
    }
}

@keyframes sparkle-border {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes sparkle-float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.8;
    }
    50% {
        transform: translateY(-5px) rotate(180deg);
        opacity: 1;
    }
}

.search-tab-content {
    display: none;
    padding: 1.5em 0;
}

.search-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

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

@media (max-width: 768px) {
    .search-tabs {
        flex-direction: column;
        gap: 0.25em;
    }
    
    .search-tab-button {
        width: 100%;
        border-radius: 8px;
        border-bottom: 1px solid rgba(0, 191, 255, 0.2);
        top: 0;
        margin-bottom: 0.25em;
    }
    
    .search-tab-button.active {
        border-bottom: 1px solid var(--accent-color);
    }
}

/* Results, Subscriptions, Notifications Items */
.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1em; /* Add space between elements */
    padding: 1em;
    margin-bottom: 0.75em;
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.6), rgba(20, 25, 38, 0.6));
    border-radius: 8px;
    border: 1px solid rgba(0, 191, 255, 0.15);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), 0 0 10px rgba(0, 191, 255, 0.05);
}

.result-item:hover {
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.8), rgba(20, 25, 38, 0.8));
    border-color: rgba(0, 191, 255, 0.4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 0 20px rgba(0, 191, 255, 0.2), 0 0 30px rgba(157, 78, 221, 0.1);
    transform: translateX(4px);
}

.result-item .result-text {
     flex-grow: 1; /* Allow text to take available space */
     line-height: 1.6;
}
.result-item .clickable-timestamp,
.result-item .share-button {
     flex-shrink: 0; /* Prevent timestamp and button from shrinking */
}

/* Share Button Styling */
.share-button {
    background: linear-gradient(135deg, rgba(0, 191, 255, 0.3), rgba(157, 78, 221, 0.25));
    border: 2px solid rgba(0, 191, 255, 0.6);
    color: #fff;
    padding: 0.6em 1.2em;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
    margin-left: 0.8em;
    text-shadow: 0 0 5px rgba(0, 191, 255, 0.5);
    box-shadow: 0 2px 10px rgba(0, 191, 255, 0.3),
                0 0 15px rgba(157, 78, 221, 0.2),
                inset 0 0 10px rgba(0, 191, 255, 0.1);
    animation: share-button-pulse 2s ease-in-out infinite;
}

@keyframes share-button-pulse {
    0%, 100% {
        box-shadow: 0 2px 10px rgba(0, 191, 255, 0.3),
                    0 0 15px rgba(157, 78, 221, 0.2),
                    inset 0 0 10px rgba(0, 191, 255, 0.1);
    }
    50% {
        box-shadow: 0 2px 15px rgba(0, 191, 255, 0.5),
                    0 0 25px rgba(157, 78, 221, 0.4),
                    inset 0 0 15px rgba(0, 191, 255, 0.2);
    }
}

.share-button:hover {
    background: linear-gradient(135deg, rgba(0, 191, 255, 0.5), rgba(157, 78, 221, 0.4));
    border-color: rgba(0, 191, 255, 0.9);
    color: #fff;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 20px rgba(0, 191, 255, 0.5),
                0 0 30px rgba(157, 78, 221, 0.4),
                inset 0 0 20px rgba(0, 191, 255, 0.2);
    text-shadow: 0 0 10px rgba(0, 191, 255, 0.8);
    animation: share-button-pulse 1s ease-in-out infinite;
}

.share-button:active {
    transform: translateY(0) scale(1);
}

/* RSS Search Results Styling */
.rss-result-item {
    display: flex;
    flex-direction: column;
    padding: 1.2em;
    margin-bottom: 1em;
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.6), rgba(20, 25, 38, 0.6));
    border: 1px solid rgba(0, 191, 255, 0.2);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.rss-result-item:hover {
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.8), rgba(20, 25, 38, 0.8));
    border-color: rgba(0, 191, 255, 0.4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 0 20px rgba(0, 191, 255, 0.2);
    transform: translateY(-2px);
}

.rss-result-header {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    margin-bottom: 0.75em;
}

.rss-result-title {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.rss-result-title:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.rss-result-meta {
    font-size: 0.85em;
    color: #aaa;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    align-items: center;
}

.rss-feed-name {
    color: var(--accent-color);
    font-weight: 500;
}

.rss-published {
    color: #888;
}

.rss-keywords {
    color: var(--accent-hover);
    font-weight: 500;
}

.rss-result-summary {
    color: var(--text-color);
    line-height: 1.6;
    margin-top: 0.5em;
    font-size: 0.95em;
    opacity: 0.9;
}

/* Social Media Platform Icons */
.social-platform-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
    justify-content: center;
    margin: 1.5em 0;
    padding: 1em;
}

.social-platform-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5em;
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.6), rgba(20, 25, 38, 0.6));
    border: 2px solid rgba(0, 191, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
    min-height: 100px;
    color: var(--text-color);
}

.social-platform-icon:hover {
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.8), rgba(20, 25, 38, 0.8));
    border-color: rgba(0, 191, 255, 0.4);
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 191, 255, 0.2), 0 0 20px rgba(0, 191, 255, 0.1);
}

.social-platform-icon.active {
    background: linear-gradient(135deg, rgba(0, 191, 255, 0.2), rgba(157, 78, 221, 0.1));
    border-color: var(--accent-color);
    color: var(--accent-color);
    box-shadow: 0 4px 12px rgba(0, 191, 255, 0.3), 0 0 25px rgba(0, 191, 255, 0.2);
    animation: pulse 2s ease-in-out infinite;
}

.social-platform-icon svg {
    width: 32px;
    height: 32px;
    margin-bottom: 0.5em;
    transition: transform 0.3s ease;
}

.social-platform-icon:hover svg {
    transform: scale(1.1);
}

.social-platform-icon.active svg {
    transform: scale(1.15);
    filter: drop-shadow(0 0 8px rgba(0, 191, 255, 0.5));
}

.social-platform-icon span {
    font-size: 0.9em;
    font-weight: 500;
    text-align: center;
}

.social-platform-icon.active span {
    font-weight: 600;
    color: var(--accent-color);
}

#social-platform-fields {
    animation: fadeIn 0.3s ease-in;
}

@media (max-width: 768px) {
    .social-platform-icons {
        gap: 0.75em;
        padding: 0.5em;
    }
    
    .social-platform-icon {
        min-width: 80px;
        min-height: 80px;
        padding: 1em;
    }
    
    .social-platform-icon svg {
        width: 28px;
        height: 28px;
    }
    
    .social-platform-icon span {
        font-size: 0.8em;
    }
}

/* Grid layout for subscriptions on desktop */
#subscriptions,
#rss-subscriptions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1em;
}

@media (min-width: 1024px) {
    #subscriptions,
    #rss-subscriptions {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5em;
    }
}

/* Grid layout for notifications on desktop */
#notifications {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1em;
}

@media (min-width: 1200px) {
    #notifications {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5em;
    }
}

.share-button {
    padding: 0.4em 0.9em;
    font-size: 0.9em;
    text-decoration: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border: 1px solid #555;
    background-color: #444;
    color: #ccc;
}
.share-button:hover {
    background-color: #555;
    color: #fff;
}
.share-button:disabled {
     cursor: default;
     opacity: 0.7;
}

.subscription-item {
    display: flex; /* Use flexbox for layout */
    justify-content: space-between; /* Push info and actions apart */
    align-items: center; /* Vertically align items */
    padding: 1.25em;
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.6), rgba(20, 25, 38, 0.6));
    border-radius: 8px;
    border: 1px solid rgba(0, 191, 255, 0.15);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), 0 0 10px rgba(0, 191, 255, 0.05);
}

.subscription-item:hover {
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.8), rgba(20, 25, 38, 0.8));
    border-color: rgba(0, 191, 255, 0.4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 0 20px rgba(0, 191, 255, 0.2), 0 0 30px rgba(157, 78, 221, 0.1);
    transform: translateX(4px);
}

.sub-info {
    flex-grow: 1; /* Allow info section to take up available space */
    margin-right: 1em; /* Space between info and actions */
}

.sub-actions {
    display: flex; /* Align buttons horizontally */
    align-items: center;
    flex-shrink: 0; /* Prevent action buttons from shrinking */
}

.sub-actions .button-link,
.sub-actions .delete-form button {
    margin-left: 0.5em;
    padding: 0.4em 0.9em;
    font-size: 0.9em;
    text-decoration: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border: none; /* Remove button border if needed */
    display: inline-block; /* Ensure links behave like buttons */
}

.sub-actions .edit-button {
    background-color: #444;
    color: #ccc;
    border: 1px solid #555;
}
.sub-actions .edit-button:hover {
    background-color: #555;
    color: #fff;
}

.sub-actions .delete-form {
    margin: 0; /* Remove default form margin */
    padding: 0;
    display: inline-block;
}
.sub-actions .delete-form button {
     background-color: #600;
     border-color: #800;
     color: #fcc;
}
.sub-actions .delete-form button:hover {
      background-color: #800;
      color: #fff;
}

/* Cancel button styling on edit page */
.button-link.cancel-link {
    display: inline-block;
    margin-left: 1em;
    padding: 0.8em 1.5em;
    background-color: #555;
    color: #ddd;
    text-decoration: none;
    border-radius: 4px;
    font-size: 1em;
    vertical-align: middle; /* Align with submit button */
}
.button-link.cancel-link:hover {
     background-color: #777;
     color: #fff;
}

.channel-id {
    font-size: 0.85em;
    color: #888;
    margin-left: 0.5em;
}

.timestamp, .clickable-timestamp {
    font-weight: bold;
    color: var(--link-color);
    cursor: pointer;
    text-decoration: underline;
}
.clickable-timestamp {
    transition: all 0.3s ease;
    text-shadow: 0 0 5px rgba(0, 191, 255, 0.3);
}

.clickable-timestamp:hover {
    color: var(--accent-hover);
    text-shadow: 0 0 10px rgba(0, 191, 255, 0.6), 0 0 15px rgba(157, 78, 221, 0.4);
    transform: scale(1.05);
    animation: pulse 1s ease-in-out infinite;
}

.notification-item {
    padding: 1.25em;
    margin-bottom: 1em;
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.6), rgba(20, 25, 38, 0.6));
    border-radius: 8px;
    border: 1px solid rgba(0, 191, 255, 0.15);
    transition: all 0.3s ease;
    line-height: 1.6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), 0 0 10px rgba(0, 191, 255, 0.05);
}

.notification-item:hover {
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.8), rgba(20, 25, 38, 0.8));
    border-color: rgba(0, 191, 255, 0.4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 0 20px rgba(0, 191, 255, 0.2), 0 0 30px rgba(157, 78, 221, 0.1);
    transform: translateX(4px);
}

.notification-item.unread {
    background: linear-gradient(135deg, rgba(0, 191, 255, 0.2), rgba(157, 78, 221, 0.1));
    border-left: 4px solid var(--accent-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), 0 0 15px rgba(0, 191, 255, 0.3), 0 0 25px rgba(157, 78, 221, 0.2);
    animation: pulse 4s ease-in-out infinite;
}

.channel-name {
    font-weight: bold;
    color: var(--heading-color);
}

.keywords-list {
    font-style: italic;
    color: #aaa;
}

/* Flash Messages */
.flash-messages {
    width: 100%;
    /* max-width: 900px; Already handled by container */
    padding: 0;
    list-style: none;
    margin-bottom: 1.5em;
}
.alert {
    padding: 0.8em 1.2em;
    margin-bottom: 1em;
    border: 1px solid transparent;
    border-radius: 6px;
    text-align: center;
}
.alert-success {
    color: white;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-purple-hover));
    border: 1px solid var(--accent-purple);
    box-shadow: 0 2px 8px rgba(157, 78, 221, 0.4), 0 0 15px rgba(157, 78, 221, 0.3);
    animation: glow-purple 3s ease-in-out infinite;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}
.alert-error {
    color: var(--error-text);
    background-color: var(--error-bg);
    border-color: var(--error-border);
}
.alert-info { /* For login required messages */
    color: #c0e0f0;
    background-color: #2a3a4a;
    border-color: #3a5a7a;
}

/* YouTube Player Container */
.player-feedback {
     min-height: 1.2em; /* Reserve space */
     text-align: left; /* Left align on desktop */
     margin-top: 1em;
     font-style: italic;
     color: var(--error-text); /* Use error color for messages initially */
}

@media (max-width: 768px) {
    .player-feedback {
        text-align: center;
    }
}

#player-container {
    margin-top: 1.5em;
    margin-bottom: 2em;
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

@media (min-width: 1024px) {
    #player-container {
        max-width: 900px; /* Larger on desktop */
    }
}

#player-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

a {
    color: var(--link-color);
    transition: all 0.3s ease;
    text-shadow: 0 0 3px rgba(0, 191, 255, 0.2);
}

a:hover {
    color: var(--accent-hover);
    text-shadow: 0 0 8px rgba(0, 191, 255, 0.5), 0 0 12px rgba(157, 78, 221, 0.3);
}

/* Small delete button */
.subscription-item form button {
     background-color: #555;
     color: #ddd;
     padding: 0.3em 0.8em;
     font-size: 0.8em;
     margin-left: 1em;
}
.subscription-item form button:hover {
     background-color: #777;
}

/* Notification action buttons */
.notification-actions {
    margin-top: 0.75em;
}
.notification-actions form {
     display: inline-block;
     margin-right: 0.5em; /* Space between buttons */
     margin-bottom: 0; /* Override general form margin */
}
 .notification-actions button {
     background-color: #444;
     color: #ccc;
     padding: 0.3em 0.8em;
     font-size: 0.8em;
     cursor: pointer;
     border: 1px solid #555;
     border-radius: 4px;
     transition: background-color 0.2s ease;
 }
 .notification-actions button:hover {
      background-color: #555;
 }
 .notification-actions .delete-button {
      background-color: #600;
      border-color: #800;
      color: #fcc;
 }
 .notification-actions .delete-button:hover {
      background-color: #800;
 }

/* Logo Styles */
.logo-container {
    text-align: center;
    margin-bottom: 1.5em;
}
.logo-container img {
     max-width: 300px; /* Adjust size as needed */
     height: auto;
     display: block;
     margin-left: auto;
     margin-right: auto;
}

/* Auth Page Specific Styles */
.auth-container .logo-container {
    margin-top: 2em;
}
.auth-switch {
    text-align: center;
    margin-top: 1.5em;
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5em 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(0, 191, 255, 0.3);
}

.auth-divider span {
    padding: 0 1em;
    color: var(--text-color);
    font-size: 0.9em;
}

.google-login-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    padding: 0.7em 1.2em;
    background-color: #ffffff;
    color: #3c4043;
    border: 1px solid #dadce0;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    box-sizing: border-box;
}

.google-login-button svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-right: 8px;
}

.google-login-button:hover {
    background-color: #f8f9fa;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.google-login-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.form-group {
     margin-bottom: 1rem;
}
.form-check {
    display: flex;
    align-items: center;
}
.form-check input[type="checkbox"] {
    margin-right: 0.5em;
    width: auto; /* Override default */
}
.form-check label {
     margin-bottom: 0; /* Override default */
}

/* Landing Page / Login Styles */
.landing-page {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2em;
}

.hero-section {
    text-align: center;
    padding: 3em 1em 4em 1em;
    margin-bottom: 4em;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero-glow-box {
    text-align: center;
    color: var(--text-color);
    max-width: 800px;
    width: 100%;
    padding: 3rem 2.5rem;
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.95), rgba(42, 52, 65, 0.9));
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7),
                0 0 40px rgba(0, 191, 255, 0.3),
                0 0 80px rgba(157, 78, 221, 0.2),
                inset 0 0 30px rgba(0, 191, 255, 0.1);
    border: 2px solid rgba(0, 191, 255, 0.4);
    position: relative;
    overflow: visible;
    animation: hero-box-glow 2s ease-in-out infinite;
}

@keyframes hero-box-glow {
    0%, 100% {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7),
                    0 0 40px rgba(0, 191, 255, 0.3),
                    0 0 80px rgba(157, 78, 221, 0.2),
                    inset 0 0 30px rgba(0, 191, 255, 0.1);
        border-color: rgba(0, 191, 255, 0.4);
    }
    50% {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7),
                    0 0 60px rgba(0, 191, 255, 0.5),
                    0 0 120px rgba(157, 78, 221, 0.4),
                    inset 0 0 50px rgba(0, 191, 255, 0.2);
        border-color: rgba(0, 191, 255, 0.7);
    }
}

.hero-glow-box::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        rgba(0, 191, 255, 0.5), 
        rgba(157, 78, 221, 0.5), 
        rgba(0, 191, 255, 0.5), 
        rgba(157, 78, 221, 0.5));
    background-size: 400% 400%;
    border-radius: 20px;
    z-index: -1;
    animation: hero-border-sparkle 3s ease infinite;
    opacity: 0.8;
}

@keyframes hero-border-sparkle {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.logo-container-large img {
     max-width: 300px;
     height: auto;
     margin-bottom: 2em;
}

.hero-section h1 {
    font-size: 2.8em;
    margin-bottom: 1em;
    font-weight: 700;
    text-align: center;
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 191, 255, 0.8), 
                 0 0 20px rgba(157, 78, 221, 0.6),
                 0 0 30px rgba(0, 191, 255, 0.4);
    animation: hero-title-glow 2s ease-in-out infinite;
    position: relative;
}

@keyframes hero-title-glow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(0, 191, 255, 0.8), 
                     0 0 20px rgba(157, 78, 221, 0.6),
                     0 0 30px rgba(0, 191, 255, 0.4);
    }
    50% {
        text-shadow: 0 0 20px rgba(0, 191, 255, 1), 
                     0 0 30px rgba(157, 78, 221, 0.8),
                     0 0 40px rgba(0, 191, 255, 0.6),
                     0 0 50px rgba(157, 78, 221, 0.4);
    }
}

.subtitle {
    font-size: 1.3em;
    color: var(--text-color);
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
    text-shadow: 0 0 5px rgba(0, 191, 255, 0.3);
}

.hero-cta {
    display: flex;
    gap: 1em;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 2em;
}

.button-primary.large {
    padding: 1em 2.5em;
    font-size: 1.1em;
}

.button-link.large {
    padding: 1em 2.5em;
    font-size: 1.1em;
}

/* Use Cases Section */
.use-cases-section {
    margin: 4em 0;
    padding: 3em 0;
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.3), rgba(20, 25, 38, 0.3));
    border-radius: 12px;
    padding: 3em 2em;
}

.use-cases-section h2 {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 0.5em;
}

.section-subtitle {
    text-align: center;
    font-size: 1.1em;
    color: #aaa;
    margin-bottom: 3em;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.use-cases-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2em;
    margin-top: 3em;
}

@media (min-width: 768px) {
    .use-cases-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .use-cases-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.use-case-card {
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.9), rgba(20, 25, 38, 0.9));
    padding: 2em;
    border-radius: 12px;
    border: 1px solid rgba(0, 191, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 191, 255, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    animation: float 8s ease-in-out infinite;
}

.use-case-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 191, 255, 0.3), 0 0 40px rgba(157, 78, 221, 0.2);
    border-color: rgba(0, 191, 255, 0.5);
    animation: float 4s ease-in-out infinite, glow 2s ease-in-out infinite;
}

.use-case-icon {
    font-size: 3em;
    margin-bottom: 1em;
    text-align: center;
}

.use-case-card h3 {
    font-size: 1.6em;
    margin-bottom: 1em;
    color: var(--heading-color);
    text-align: center;
}

.use-case-description {
    font-size: 1em;
    line-height: 1.7;
    color: var(--text-color);
    margin-bottom: 1.5em;
    flex-grow: 1;
}

.use-case-benefits {
    list-style: none;
    padding: 0;
    margin: 0;
}

.use-case-benefits li {
    padding: 0.5em 0;
    padding-left: 1.5em;
    position: relative;
    color: #ccc;
    font-size: 0.95em;
}

.use-case-benefits li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}

/* Features Section */
.features-section {
    margin: 4em 0;
    padding: 3em 2em;
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.6), rgba(20, 25, 38, 0.6));
    border-radius: 12px;
    border: 1px solid rgba(0, 191, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 191, 255, 0.1);
}

.features-section h2 {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 2em;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2em;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.feature-item {
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.7), rgba(20, 25, 38, 0.7));
    padding: 2em;
    border-radius: 8px;
    border: 1px solid rgba(0, 191, 255, 0.2);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 15px rgba(0, 191, 255, 0.1);
    animation: float 10s ease-in-out infinite;
}

.feature-item:hover {
    border-color: rgba(0, 191, 255, 0.5);
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.9), rgba(20, 25, 38, 0.9));
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 25px rgba(0, 191, 255, 0.3), 0 0 35px rgba(157, 78, 221, 0.2);
    transform: translateY(-4px);
    animation: float 5s ease-in-out infinite, glow 2s ease-in-out infinite;
}

.feature-item h3 {
    font-size: 1.4em;
    margin-bottom: 0.75em;
    color: var(--heading-color);
}

.feature-item p {
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
}

/* CTA Section */
.cta-section {
    text-align: center;
    padding: 4em 2em;
    margin: 4em 0;
    background-color: rgba(0, 170, 255, 0.1);
    border-radius: 12px;
    border: 2px solid var(--accent-color);
}

.cta-section h2 {
    font-size: 2.5em;
    margin-bottom: 0.5em;
    text-align: center;
}

.cta-subtitle {
    font-size: 1.2em;
    color: #aaa;
    margin-bottom: 2em;
}

.cta-buttons {
    display: flex;
    gap: 1.5em;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.login-section {
    max-width: 450px; /* Narrower width for login box */
    margin-left: auto;
    margin-right: auto;
    /* background-color: var(--card-bg); */
    background-color: rgba(42, 42, 42, 0.9); /* Slightly more opaque login box */
}

.login-section .form-group {
    max-width: 100%;
    box-sizing: border-box;
}

.login-section h2 {
     margin-bottom: 1em;
}

/* Admin Table Styles */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1em;
}
.admin-table th, .admin-table td {
    border: 1px solid var(--border-color);
    padding: 0.6em 0.8em;
    text-align: left;
}
.admin-table th {
    background-color: #333;
}
.admin-table tr:nth-child(even) {
     background-color: rgba(255, 255, 255, 0.03);
}
.admin-table .small-button {
     font-size: 0.85em;
     padding: 0.3em 0.7em;
}

/* Search Results Section - Desktop Layout */
#search-results h3 {
    margin-bottom: 1.5em;
    padding-bottom: 0.5em;
    border-bottom: 2px solid var(--border-color);
}

#results-list {
    margin-top: 1.5em;
}

/* Search History Styles */
.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1em 1.25em;
    margin-bottom: 0.75em;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: all 0.2s ease;
}

.history-item:hover {
    background-color: rgba(255, 255, 255, 0.07);
    transform: translateX(4px);
    border-color: var(--accent-color);
}

.history-details {
    flex-grow: 1;
    margin-right: 1em;
}

.history-title {
    display: block; /* Ensure title is on its own line if needed */
    font-weight: bold;
    color: var(--text-color);
    margin-bottom: 0.2em;
}

.history-keywords {
     display: block; /* Ensure keywords are below title */
     font-size: 0.9em;
     color: #aaa;
     font-style: italic;
}

.history-meta {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.history-time {
    font-size: 0.8em;
    color: #888;
    margin-right: 1em;
}

.history-delete-button {
    background: none;
    border: none;
    color: #888;
    font-size: 1.5em; /* Make cross larger */
    line-height: 1;
    padding: 0 0.3em;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.history-delete-button:hover {
    opacity: 1;
    color: var(--error-text);
}

.history-delete-button:disabled {
    opacity: 0.3;
    cursor: default;
}

/* Loading Overlay Styles */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9), rgba(10, 14, 26, 0.95));
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
    animation: overlay-pulse 3s ease-in-out infinite;
}

@keyframes overlay-pulse {
    0%, 100% {
        background: linear-gradient(135deg, rgba(0, 0, 0, 0.9), rgba(10, 14, 26, 0.95));
    }
    50% {
        background: linear-gradient(135deg, rgba(0, 0, 0, 0.85), rgba(10, 14, 26, 0.9));
        box-shadow: inset 0 0 100px rgba(0, 191, 255, 0.1), inset 0 0 200px rgba(157, 78, 221, 0.05);
    }
}

.loading-content {
    text-align: center;
    color: var(--text-color);
    max-width: 500px;
    padding: 2.5rem;
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.95), rgba(42, 52, 65, 0.9));
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7),
                0 0 40px rgba(0, 191, 255, 0.3),
                0 0 80px rgba(157, 78, 221, 0.2),
                inset 0 0 30px rgba(0, 191, 255, 0.1);
    border: 2px solid rgba(0, 191, 255, 0.4);
    position: relative;
    overflow: visible;
    animation: loading-content-glow 2s ease-in-out infinite;
}

@keyframes loading-content-glow {
    0%, 100% {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7),
                    0 0 40px rgba(0, 191, 255, 0.3),
                    0 0 80px rgba(157, 78, 221, 0.2),
                    inset 0 0 30px rgba(0, 191, 255, 0.1);
        border-color: rgba(0, 191, 255, 0.4);
    }
    50% {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7),
                    0 0 60px rgba(0, 191, 255, 0.5),
                    0 0 120px rgba(157, 78, 221, 0.4),
                    inset 0 0 50px rgba(0, 191, 255, 0.2);
        border-color: rgba(0, 191, 255, 0.7);
    }
}

.loading-content::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        rgba(0, 191, 255, 0.5), 
        rgba(157, 78, 221, 0.5), 
        rgba(0, 191, 255, 0.5), 
        rgba(157, 78, 221, 0.5));
    background-size: 400% 400%;
    border-radius: 16px;
    z-index: -1;
    animation: loading-border-sparkle 3s ease infinite;
    opacity: 0.8;
}

@keyframes loading-border-sparkle {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.loading-content h2 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(0, 191, 255, 0.8), 
                 0 0 20px rgba(157, 78, 221, 0.6),
                 0 0 30px rgba(0, 191, 255, 0.4);
    animation: loading-title-glow 2s ease-in-out infinite;
    position: relative;
}

@keyframes loading-title-glow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(0, 191, 255, 0.8), 
                     0 0 20px rgba(157, 78, 221, 0.6),
                     0 0 30px rgba(0, 191, 255, 0.4);
    }
    50% {
        text-shadow: 0 0 20px rgba(0, 191, 255, 1), 
                     0 0 30px rgba(157, 78, 221, 0.8),
                     0 0 40px rgba(0, 191, 255, 0.6),
                     0 0 50px rgba(157, 78, 221, 0.4);
    }
}

.loading-content h2::after {
    content: '✨';
    position: absolute;
    top: -8px;
    right: -30px;
    font-size: 1.2em;
    animation: sparkle-float 2s ease-in-out infinite;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.loading-content p {
    margin-bottom: 2rem;
    color: #aaa;
    font-size: 0.95rem;
}

/* Spinner Animation */
.loading-spinner {
    width: 70px;
    height: 70px;
    margin: 0 auto;
    border: 5px solid rgba(0, 191, 255, 0.2);
    border-top: 5px solid var(--accent-color);
    border-right: 5px solid var(--accent-purple);
    border-radius: 50%;
    animation: spin-glow 1s linear infinite;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 191, 255, 0.5),
                0 0 40px rgba(157, 78, 221, 0.3),
                inset 0 0 20px rgba(0, 191, 255, 0.2);
}

.loading-spinner::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: rgba(0, 191, 255, 0.6);
    border-right-color: rgba(157, 78, 221, 0.6);
    animation: spin-glow 0.8s linear infinite reverse;
}

@keyframes spin-glow {
    0% { 
        transform: rotate(0deg);
        box-shadow: 0 0 20px rgba(0, 191, 255, 0.5),
                    0 0 40px rgba(157, 78, 221, 0.3),
                    inset 0 0 20px rgba(0, 191, 255, 0.2);
    }
    50% {
        box-shadow: 0 0 30px rgba(0, 191, 255, 0.7),
                    0 0 60px rgba(157, 78, 221, 0.5),
                    inset 0 0 30px rgba(0, 191, 255, 0.3);
    }
    100% { 
        transform: rotate(360deg);
        box-shadow: 0 0 20px rgba(0, 191, 255, 0.5),
                    0 0 40px rgba(157, 78, 221, 0.3),
                    inset 0 0 20px rgba(0, 191, 255, 0.2);
    }
}

/* Loading Steps */
.loading-steps {
    margin-top: 2rem;
    text-align: left;
}

.loading-step {
    padding: 0.75rem 1rem;
    margin: 0.5rem 0;
    background: var(--bg-color);
    border-radius: 6px;
    border-left: 3px solid transparent;
    color: #888;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.loading-step.active {
    border-left-color: var(--accent-color);
    color: #fff;
    background: linear-gradient(90deg, rgba(0, 191, 255, 0.2), rgba(157, 78, 221, 0.15));
    animation: step-pulse-glow 1.5s ease-in-out infinite;
    text-shadow: 0 0 8px rgba(0, 191, 255, 0.6);
    box-shadow: 0 0 15px rgba(0, 191, 255, 0.3),
                inset 0 0 10px rgba(0, 191, 255, 0.1);
}

@keyframes step-pulse-glow {
    0%, 100% { 
        opacity: 1;
        background: linear-gradient(90deg, rgba(0, 191, 255, 0.2), rgba(157, 78, 221, 0.15));
        box-shadow: 0 0 15px rgba(0, 191, 255, 0.3),
                    inset 0 0 10px rgba(0, 191, 255, 0.1);
    }
    50% { 
        opacity: 0.9;
        background: linear-gradient(90deg, rgba(0, 191, 255, 0.3), rgba(157, 78, 221, 0.25));
        box-shadow: 0 0 25px rgba(0, 191, 255, 0.5),
                    0 0 40px rgba(157, 78, 221, 0.3),
                    inset 0 0 15px rgba(0, 191, 255, 0.2);
    }
}

/* Profile Page Styles */
.profile-section {
    text-align: center;
}

.profile-section h2 {
    text-align: center !important;
    margin-bottom: 1.25em;
}

.profile-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5em;
    padding: 0.5em 0;
    max-width: 700px;
    margin: 0 auto;
    justify-items: center;
}

@media (min-width: 768px) {
    .profile-container {
        grid-template-columns: 1fr;
        gap: 2em;
        align-items: center;
        justify-items: center;
    }
}

.profile-image-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0.75em;
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.5), rgba(20, 25, 38, 0.5));
    border-radius: 12px;
    border: 1px solid rgba(0, 191, 255, 0.2);
    width: 100%;
}

.profile-image-wrapper {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--accent-color);
    box-shadow: 0 4px 16px rgba(0, 191, 255, 0.3), 0 0 25px rgba(0, 191, 255, 0.2);
    margin-bottom: 0.75em;
    background-color: var(--card-bg);
    transition: all 0.3s ease;
    animation: float 6s ease-in-out infinite;
}

.profile-image-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 191, 255, 0.4), 0 0 35px rgba(0, 191, 255, 0.3);
    border-color: var(--accent-hover);
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: white;
    font-size: 2.5em;
    font-weight: bold;
}

.profile-image-hint {
    font-size: 0.85em;
    color: #aaa;
    margin-top: 0.25em;
    margin-bottom: 0;
}

.profile-form {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    text-align: left;
}

.profile-form .form-group {
    margin-bottom: 1em;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.profile-form label {
    display: block;
    margin-bottom: 0.4em;
    font-weight: 600;
    color: var(--text-color);
    font-size: 15px;
    text-align: left;
    width: 100%;
}

.profile-form input[type="text"],
.profile-form input[type="password"],
.profile-form input[type="file"] {
    width: 100% !important;
    padding: 0.85em 1em !important;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 6px;
    color: var(--text-color);
    font-size: 16px; /* Prevent iOS zoom - must be 16px or larger */
    transition: all 0.3s ease;
    box-sizing: border-box !important;
    min-height: 44px !important; /* Better touch targets */
    height: auto;
    -webkit-appearance: none;
    appearance: none;
}

/* Ensure password fields are identical - override all possible browser styles */
.profile-form input#current_password,
.profile-form input#new_password {
    width: 100% !important;
    padding: 0.85em 1em !important;
    box-sizing: border-box !important;
    min-height: 44px !important;
    height: 44px !important;
    line-height: 1.5 !important;
    font-size: 16px !important;
    margin: 0 !important;
    border: 1px solid var(--input-border) !important;
    border-radius: 6px !important;
    background-color: var(--input-bg) !important;
    color: var(--text-color) !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

/* Override browser autofill styles */
.profile-form input#current_password:-webkit-autofill,
.profile-form input#new_password:-webkit-autofill,
.profile-form input#current_password:-webkit-autofill:hover,
.profile-form input#new_password:-webkit-autofill:hover,
.profile-form input#current_password:-webkit-autofill:focus,
.profile-form input#new_password:-webkit-autofill:focus {
    width: 100% !important;
    padding: 0.85em 1em !important;
    box-sizing: border-box !important;
    min-height: 44px !important;
    height: 44px !important;
    line-height: 1.5 !important;
    font-size: 16px !important;
    border: 1px solid var(--input-border) !important;
    border-radius: 6px !important;
    -webkit-box-shadow: 0 0 0 30px var(--input-bg) inset !important;
    -webkit-text-fill-color: var(--text-color) !important;
}

.profile-form input[type="text"]:focus,
.profile-form input[type="password"]:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 191, 255, 0.2), 0 0 15px rgba(0, 191, 255, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

.profile-form input[type="file"] {
    padding: 0.85em 1em;
    cursor: pointer;
    font-size: 16px;
    min-height: 44px;
}

.profile-form input[type="file"]:hover {
    border-color: var(--accent-color);
}

.form-hint {
    display: block;
    font-size: 0.8em;
    color: #aaa;
    margin-top: 0.35em;
    margin-bottom: 0;
    font-style: italic;
    line-height: 1.4;
}

.delete-image-button {
    background: linear-gradient(135deg, rgba(200, 0, 0, 0.8), rgba(150, 0, 0, 0.8));
    color: #fff;
    border: 1px solid rgba(200, 0, 0, 0.5);
    padding: 0.6em 1.2em;
    font-size: 0.9em;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.delete-image-button:hover {
    background: linear-gradient(135deg, rgba(220, 0, 0, 0.9), rgba(180, 0, 0, 0.9));
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(200, 0, 0, 0.4);
}

.form-actions {
    display: flex;
    gap: 1em;
    margin-top: 1.25em;
    justify-content: center;
}

.profile-form .form-actions {
    justify-content: center;
}

.button-primary {
    background-color: var(--button-bg);
    color: white;
    padding: 0.9em 2em;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 170, 255, 0.3);
    text-decoration: none;
    display: inline-block;
}

.button-primary:hover {
    background-color: var(--button-hover-bg);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 170, 255, 0.4);
}

/* Navigation Profile Dropdown */
.nav-profile-dropdown {
    position: relative;
    z-index: 10001;
}

.nav-profile-link {
    display: flex;
    align-items: center;
    gap: 0.5em;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.2s ease;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5em;
    border-radius: 6px;
    font-size: 1em;
    font-family: inherit;
}

.nav-profile-link:hover {
    color: var(--accent-color);
    background-color: rgba(255, 255, 255, 0.05);
}

.nav-profile-link.active {
    background-color: rgba(0, 170, 255, 0.1);
    color: var(--accent-color);
}

.dropdown-arrow {
    font-size: 0.7em;
    margin-left: 0.25em;
    transition: transform 0.2s ease;
}

.nav-profile-link.active .dropdown-arrow {
    transform: rotate(180deg);
}

.nav-profile-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5em;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 10000 !important;
    padding: 0.5em 0;
    pointer-events: none;
}

.nav-profile-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto !important;
}

.nav-profile-dropdown-menu a {
    display: block;
    padding: 0.75em 1.25em;
    color: var(--text-color) !important;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
    font-size: 0.95em;
    cursor: pointer !important;
    pointer-events: auto !important;
    position: relative;
    z-index: 1001;
    opacity: 1 !important;
    user-select: none;
    -webkit-user-select: none;
}

.nav-profile-dropdown-menu a:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--accent-color) !important;
}

.nav-profile-dropdown-menu a:active {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--accent-color) !important;
}

.nav-profile-dropdown-menu a:visited {
    color: var(--text-color) !important;
}

.dropdown-divider {
    margin: 0.5em 0;
    border: none;
    border-top: 1px solid var(--border-color);
}

/* Mobile profile links - hidden on desktop */
.nav-profile-mobile-links {
    display: none;
}

@media (max-width: 768px) {
    /* Hide desktop dropdown on mobile */
    .nav-profile-dropdown {
        display: none;
    }
    
    /* Show mobile links on mobile */
    .nav-profile-mobile-links {
        display: block;
        width: 100%;
    }
    
    .nav-profile-mobile-header {
        display: flex;
        align-items: center;
        gap: 0.75em;
        padding: 1em 0;
        border-bottom: 1px solid rgba(0, 191, 255, 0.1);
        margin-bottom: 0.5em;
    }
    
    .nav-profile-image-mobile {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        object-fit: cover;
        border: 2px solid var(--accent-color);
    }
    
    .nav-profile-initial-mobile {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--accent-color), var(--accent-purple));
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-weight: bold;
        font-size: 1.2em;
        border: 2px solid var(--accent-color);
    }
    
    .nav-user-mobile {
        font-weight: 600;
        color: var(--text-color);
        font-size: 1.1em;
    }
    
    .nav-profile-mobile-links a {
        display: block;
        width: 100%;
        padding: 1em 0;
        border-bottom: 1px solid rgba(0, 191, 255, 0.1);
        color: var(--link-color);
        text-decoration: none;
        font-size: 1.1em;
        transition: color 0.2s ease;
    }
    
    .nav-profile-mobile-links a:hover {
        color: var(--accent-hover);
    }
    
    .nav-profile-mobile-links .dropdown-divider {
        margin: 0.5em 0;
        border: none;
        border-top: 1px solid rgba(0, 191, 255, 0.1);
    }
}

.nav-profile-image {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-color);
}

.nav-profile-initial {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9em;
    border: 2px solid var(--accent-color);
}

.nav-user {
    margin: 0;
}

/* Section Header with Actions */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5em;
    flex-wrap: wrap;
    gap: 1em;
}

.section-header h2 {
    margin: 0;
}

.section-actions {
    display: flex;
    gap: 0.75em;
    align-items: center;
}

.clear-all-button {
    background-color: #600;
    color: #fcc;
    border: 1px solid #800;
    padding: 0.5em 1em;
    font-size: 0.9em;
}

.clear-all-button:hover {
    background-color: #800;
    color: #fff;
}

.collapse-toggle {
    background-color: #444;
    color: #ccc;
    border: 1px solid #555;
    padding: 0.5em 1em;
    font-size: 0.9em;
    cursor: pointer;
}

.collapse-toggle:hover {
    background-color: #555;
    color: #fff;
}

.collapse-toggle.collapsed {
    background-color: rgba(0, 170, 255, 0.2);
    border-color: var(--accent-color);
}

.history-list-container {
    transition: opacity 0.3s ease;
}

@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .section-actions {
        width: 100%;
        justify-content: space-between;
    }
}

/* Premium Features */
.premium-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-purple-hover));
    color: white;
    padding: 0.25em 0.75em;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: bold;
    margin-left: 0.5em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(157, 78, 221, 0.4);
    animation: glow-purple 2.5s ease-in-out infinite;
    transition: all 0.3s ease;
}

.premium-badge:hover {
    animation: glow-purple 1s ease-in-out infinite;
    transform: scale(1.05);
}

.upgrade-prompt {
    background: linear-gradient(135deg, rgba(0, 191, 255, 0.15), rgba(157, 78, 221, 0.1));
    border: 2px dashed var(--accent-color);
    border-radius: 12px;
    padding: 2em;
    text-align: center;
    margin: 1.5em 0;
    animation: pulse 3s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(0, 191, 255, 0.2), inset 0 0 20px rgba(157, 78, 221, 0.1);
}

.upgrade-prompt:hover {
    animation: pulse 2s ease-in-out infinite;
    border-color: var(--accent-purple);
    box-shadow: 0 0 30px rgba(0, 191, 255, 0.3), 0 0 40px rgba(157, 78, 221, 0.2), inset 0 0 30px rgba(157, 78, 221, 0.15);
}

.upgrade-prompt h3 {
    color: var(--accent-color);
    margin-top: 0;
    font-size: 1.5em;
    text-shadow: 0 0 10px rgba(0, 191, 255, 0.5);
}

.upgrade-prompt p {
    margin: 0.75em 0;
    color: var(--text-color);
}

.upgrade-prompt strong {
    color: var(--accent-color);
}

/* Admin Dashboard Styles */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5em;
    margin: 1.5em 0;
}

.stat-card {
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.8), rgba(20, 25, 38, 0.8));
    border: 1px solid rgba(0, 191, 255, 0.3);
    border-radius: 12px;
    padding: 1.5em;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 0 15px rgba(0, 191, 255, 0.1);
    animation: float 8s ease-in-out infinite;
}

.stat-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 25px rgba(0, 191, 255, 0.3), 0 0 35px rgba(157, 78, 221, 0.2);
    border-color: var(--accent-color);
    animation: float 4s ease-in-out infinite, glow 2s ease-in-out infinite;
}

.stat-card h3 {
    margin: 0 0 0.5em 0;
    font-size: 1em;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: var(--accent-color);
    display: block;
    margin: 0.5em 0;
    text-shadow: 0 0 10px rgba(0, 191, 255, 0.5), 0 0 20px rgba(157, 78, 221, 0.3);
    animation: pulse 3s ease-in-out infinite;
}

.stat-card small {
    color: #888;
    font-size: 0.85em;
}

.admin-actions {
    display: flex;
    gap: 1em;
    flex-wrap: wrap;
    margin: 1.5em 0;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    background: rgba(42, 42, 42, 0.6);
    border-radius: 8px;
    overflow: hidden;
}

.admin-table thead {
    background: rgba(0, 170, 255, 0.2);
}

.admin-table th {
    padding: 1em;
    text-align: left;
    font-weight: 600;
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
}

.admin-table td {
    padding: 1em;
    border-bottom: 1px solid var(--border-color);
}

.admin-table tbody tr:hover {
    background: rgba(0, 170, 255, 0.05);
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.action-buttons {
    display: flex;
    gap: 0.5em;
    flex-wrap: wrap;
}

.small-button {
    padding: 0.4em 0.8em;
    font-size: 0.85em;
}

.admin-form {
    max-width: 600px;
}

.admin-form .form-group {
    margin-bottom: 1.5em;
}

.admin-form label {
    display: block;
    margin-bottom: 0.5em;
    font-weight: 500;
}

.admin-form input[type="text"],
.admin-form input[type="password"] {
    width: 100%;
    padding: 0.75em;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 6px;
    color: var(--text-color);
    font-size: 1em;
}

.admin-form input[type="checkbox"] {
    margin-right: 0.5em;
    width: 1.2em;
    height: 1.2em;
    cursor: pointer;
}

.admin-form small {
    display: block;
    margin-top: 0.25em;
    color: #888;
    font-size: 0.85em;
}

.form-actions {
    display: flex;
    gap: 1em;
    margin-top: 2em;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-table {
        font-size: 0.9em;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 0.75em 0.5em;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons form {
        width: 100%;
    }
    
    .action-buttons button {
        width: 100%;
    }
}

/* Pricing Page Styles */
.pricing-section {
    margin: 4em 0;
    padding: 2em 0;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2em;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2em;
}

.pricing-card {
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.9), rgba(20, 25, 38, 0.9));
    border: 2px solid rgba(0, 191, 255, 0.2);
    border-radius: 16px;
    padding: 2.5em;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 191, 255, 0.1);
    animation: float 10s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.pricing-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 191, 255, 0.3), 0 0 40px rgba(157, 78, 221, 0.2);
    border-color: rgba(0, 191, 255, 0.5);
    animation: float 5s ease-in-out infinite, glow 2s ease-in-out infinite;
}

.pricing-card.featured {
    border: 2px solid var(--accent-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 25px rgba(0, 191, 255, 0.3);
    transform: scale(1.05);
}

.pricing-card.premium {
    border: 2px solid var(--accent-purple);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 25px rgba(157, 78, 221, 0.3);
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.95), rgba(20, 25, 38, 0.95));
}

.pricing-badge {
    position: absolute;
    top: 1em;
    right: 1em;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: white;
    padding: 0.4em 0.8em;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 191, 255, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

.pricing-badge.premium-badge {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-purple-hover));
    box-shadow: 0 2px 8px rgba(157, 78, 221, 0.4);
    animation: glow-purple 2s ease-in-out infinite;
}

.pricing-header {
    margin-bottom: 2em;
    padding-bottom: 1.5em;
    border-bottom: 1px solid rgba(0, 191, 255, 0.2);
}

.pricing-header h3 {
    font-size: 2em;
    margin-bottom: 0.5em;
    color: var(--heading-color);
    text-shadow: 0 0 10px rgba(0, 191, 255, 0.3);
}

.pricing-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25em;
    margin-top: 0.5em;
}

.price-amount {
    font-size: 3em;
    font-weight: bold;
    color: var(--accent-color);
    text-shadow: 0 0 15px rgba(0, 191, 255, 0.5);
    animation: pulse 3s ease-in-out infinite;
}

.pricing-card.premium .price-amount {
    color: var(--accent-purple);
    text-shadow: 0 0 15px rgba(157, 78, 221, 0.5);
}

.price-period {
    font-size: 1.2em;
    color: #aaa;
}

.pricing-features {
    text-align: left;
    margin: 2em 0;
    min-height: 300px;
}

.pricing-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pricing-features li {
    padding: 0.75em 0;
    color: var(--text-color);
    border-bottom: 1px solid rgba(0, 191, 255, 0.1);
    font-size: 1em;
    line-height: 1.6;
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-cta {
    margin-top: 2em;
    padding-top: 2em;
    border-top: 1px solid rgba(0, 191, 255, 0.2);
}

.current-plan-badge {
    display: inline-block;
    padding: 0.8em 2em;
    background: linear-gradient(135deg, rgba(0, 191, 255, 0.2), rgba(157, 78, 221, 0.2));
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    border-radius: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pricing-faq {
    margin: 4em 0;
    padding: 3em 2em;
}

.pricing-faq h2 {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 2em;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2em;
    max-width: 1200px;
    margin: 0 auto;
}

.faq-item {
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.7), rgba(20, 25, 38, 0.7));
    padding: 2em;
    border-radius: 12px;
    border: 1px solid rgba(0, 191, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 15px rgba(0, 191, 255, 0.1);
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: rgba(0, 191, 255, 0.4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 25px rgba(0, 191, 255, 0.2);
    transform: translateY(-4px);
}

.faq-item h3 {
    color: var(--accent-color);
    margin-bottom: 1em;
    font-size: 1.3em;
}

.faq-item p {
    color: var(--text-color);
    line-height: 1.7;
    margin: 0;
}

@media (max-width: 768px) {
    .pricing-grid {
        grid-template-columns: 1fr;
        padding: 0 1em;
    }
    
    .pricing-card.featured {
        transform: scale(1);
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
    }
}

/* Global mobile fix to prevent horizontal scrolling */
@media (max-width: 768px) {
    * {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    img, video, iframe, embed, object {
        max-width: 100%;
        height: auto;
    }
    
    table {
        width: 100%;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Ensure forms don't overflow */
    form {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Ensure all text containers are constrained */
    p, div, span, a, h1, h2, h3, h4, h5, h6 {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Prevent fixed width elements from causing overflow */
    .nav-links.mobile-open {
        max-width: 280px;
        width: 280px;
    }
    
    /* Ensure video background doesn't cause overflow */
    .video-background-container {
        width: 100vw;
        max-width: 100vw;
        overflow: hidden;
    }
    
    #background-video {
        max-width: 100vw;
        width: 100vw;
    }
} 