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

:root {
    /* Light mode colors */
    --bg-primary: #f5f5f5;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f9fafb;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --accent-primary: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-secondary: #dc2626;
    --accent-tertiary: #16a34a;
    --border-color: #e5e7eb;
    --shadow-sm: rgba(0, 0, 0, 0.1);
    --shadow-md: rgba(0, 0, 0, 0.15);
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    --gradient-hero: linear-gradient(135deg, #1e40af 0%, #7c3aed 50%, #dc2626 100%);
}

:root.dark-mode,
body.dark-mode {
    /* Dark mode colors */
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: #383838;
    --text-primary: #FFFFFF;
    --text-secondary: #FFFFFF;
    --text-tertiary: #8a8a8a;
    --accent-primary: #60a5fa;
    --accent-hover: #93c5fd;
    --accent-secondary: #ef4444;
    --accent-tertiary: #22c55e;
    --border-color: #404040;
    --shadow-sm: rgba(0, 0, 0, 0.3);
    --shadow-md: rgba(0, 0, 0, 0.4);
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --gradient-hero: linear-gradient(135deg, #2563eb 0%, #8b5cf6 50%, #ef4444 100%);
}

html {
    background-color: var(--bg-primary);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Navigation */
.main-nav {
    background-color: var(--bg-secondary);
    box-shadow: 0 2px 4px var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dark-mode-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.dark-mode-toggle:hover {
    transform: scale(1.1);
}

:root:not(.dark-mode) .dark-mode-toggle .moon-icon,
body:not(.dark-mode) .dark-mode-toggle .moon-icon {
    display: none;
}

:root.dark-mode .dark-mode-toggle .sun-icon,
body.dark-mode .dark-mode-toggle .sun-icon {
    display: none;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    transition: background-color 0.3s ease;
}

/* Main content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: calc(100vh - 80px);
}

/* Homepage */
/* ============================================
   HOMEPAGE STYLES - Revolutionary Thinking
   ============================================ */

.homepage {
    max-width: 100%;
    margin: 0 auto;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 0.75rem 1.5rem 0.75rem;
    background: var(--gradient-hero);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
    position: relative;
    z-index: 1;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
    opacity: 0.95;
}

.hero-description {
    font-size: 1.125rem;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    position: relative;
    z-index: 1;
    opacity: 0.9;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.content-card {
    background: var(--bg-secondary);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px var(--shadow-sm);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.content-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.content-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px var(--shadow-md);
    border-color: var(--accent-primary);
}

.content-card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.content-card h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.content-card h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--accent-primary);
    font-style: italic;
}

.content-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.card-cta {
    color: var(--accent-primary);
    font-weight: 600;
    display: inline-block;
    transition: transform 0.3s ease;
}

.content-card:hover .card-cta {
    transform: translateX(4px);
}

/* CTA Section */
.cta-section {
    text-align: center;
    padding: 4rem 2rem 6rem;
    background: var(--bg-tertiary);
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.cta-section p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-block;
    padding: 1rem 3rem;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.125rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

/* Thought Map Home */
.thought-map-home {
    padding: 2rem;
}

.thought-map-home h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 3rem;
}

.moc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.moc-card {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow-sm);
    text-decoration: none;
    color: var(--text-primary);
    transition: transform 0.3s, box-shadow 0.3s, background-color 0.3s ease;
}

.moc-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px var(--shadow-md);
}

.moc-card h2 {
    margin-bottom: 0.5rem;
    color: var(--accent-primary);
    transition: color 0.3s ease;
}

/* MoC Page */
.moc-page {
    padding: 2rem;
}

.moc-page h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.core-ideas {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow-sm);
    transition: background-color 0.3s ease;
}

.core-idea-link {
    display: block;
    padding: 1rem;
    margin: 0.5rem 0;
    background: var(--bg-tertiary);
    border-left: 4px solid var(--accent-primary);
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.3s, color 0.3s ease;
}

.core-idea-link:hover {
    background: var(--border-color);
}

/* Idea Card */
.idea-container {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 60vh;
}

.idea-card {
    background: var(--bg-secondary);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 16px var(--shadow-sm);
    max-width: 600px;
    width: 100%;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.idea-text {
    font-size: 1.5rem;
    line-height: 1.8;
    margin-bottom: 0;
    text-align: left;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.idea-description {
    font-size: 1rem;
    line-height: 1.6;
    margin-top: 1rem;
    margin-bottom: 0;
    padding: 0.25rem 0.75rem;
    background: var(--bg-tertiary);
    border-left: 3px solid var(--accent-primary);
    border-radius: 6px;
    color: var(--text-secondary);
    white-space: pre-line;
    transition: all 0.3s ease;
}

.connections {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    transition: border-color 0.3s ease;
}

.connection-link {
    display: block;
    padding: 1rem;
    margin: 0.5rem 0;
    background: var(--bg-tertiary);
    border-radius: 6px;
    text-decoration: none;
    color: var(--accent-primary);
    transition: all 0.3s;
}

.connection-link:hover {
    background: var(--border-color);
    transform: translateX(8px);
    color: var(--accent-hover);
}

.no-connections {
    color: var(--text-tertiary);
    font-style: italic;
}

.admin-quick-actions {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    transition: border-color 0.3s ease;
}

.admin-quick-actions .btn-small {
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
}

.navigation-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.back-link {
    display: inline-block;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--text-primary);
}

.back-button {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.back-button:hover {
    background: var(--border-color);
    color: var(--text-primary);
    border-color: var(--accent-primary);
}

/* Alerts */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
}

/* Admin styles */
.admin-section,
.admin-view-idea,
.admin-edit-idea {
    background: var(--bg-secondary);
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow-sm);
    transition: background-color 0.3s ease;
}

.admin-section a:not(.btn):not(.btn-small):not(.btn-success),
.admin-view-idea a:not(.btn):not(.btn-small):not(.btn-success),
.admin-edit-idea a:not(.btn):not(.btn-small):not(.btn-success) {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.admin-section a:not(.btn):not(.btn-small):not(.btn-success):hover,
.admin-view-idea a:not(.btn):not(.btn-small):not(.btn-success):hover,
.admin-edit-idea a:not(.btn):not(.btn-small):not(.btn-success):hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.logout-link {
    color: var(--accent-primary) !important;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    background: var(--bg-tertiary);
    transition: all 0.3s ease;
}

.logout-link:hover {
    background: var(--border-color);
    color: var(--accent-hover) !important;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-header h2 {
    margin: 0;
}

.moc-list {
    list-style: none;
}

.moc-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.btn-small {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.85rem;
    background-color: var(--accent-primary);
    color: white !important;
    text-decoration: none !important;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-small:hover {
    background-color: var(--accent-hover);
    color: white !important;
    text-decoration: none !important;
}

.idea-list {
    list-style: none;
}

.idea-list li {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: border-color 0.3s ease;
}

.idea-meta {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-left: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--accent-primary);
    color: white !important;
    text-decoration: none !important;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    color: white !important;
    text-decoration: none !important;
}

.btn-success {
    background-color: #10b981;
    color: white !important;
    text-decoration: none !important;
}

.btn-success:hover {
    background-color: #059669;
    color: white !important;
    text-decoration: none !important;
}

.btn-secondary {
    background-color: #6b7280;
    color: white !important;
    text-decoration: none !important;
}

.btn-secondary:hover {
    background-color: #4b5563;
    color: white !important;
    text-decoration: none !important;
}

.btn-danger {
    background-color: #dc2626;
    color: white !important;
    text-decoration: none !important;
}

.btn-danger:hover {
    background-color: #b91c1c;
    color: white !important;
    text-decoration: none !important;
}

.idea-details {
    background: var(--bg-tertiary);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    transition: background-color 0.3s ease;
}

.idea-details h2 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.idea-details .idea-description {
    margin: 1rem 0;
    font-size: 0.95rem;
}

.idea-details .idea-meta {
    margin-top: 1rem;
}

.idea-details .idea-meta p {
    margin: 0.5rem 0;
    color: var(--text-secondary);
}

.version-info {
    background: var(--bg-tertiary);
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--accent-primary);
    transition: background-color 0.3s ease;
}

.version-info p {
    margin: 0.25rem 0;
    color: var(--text-secondary);
}

.version-info .note {
    font-size: 0.9rem;
    font-style: italic;
    color: var(--text-tertiary);
}

.connections-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    transition: border-color 0.3s ease;
}

.connections-section h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.connections-section ul {
    list-style: none;
    padding: 0;
}

.connections-section li {
    padding: 0.75rem;
    margin: 0.5rem 0;
    background: var(--bg-tertiary);
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.connections-section li:hover {
    background: var(--border-color);
}

.admin-actions {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.admin-actions form {
    margin: 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ============================================
   FOOTER STYLES
   ============================================ */

.main-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 2rem 1.5rem;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-section h4 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-weight: 600;
}

.footer-section p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--accent-primary);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-bottom p {
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .idea-card {
        padding: 2rem 1.5rem;
    }

    .idea-text {
        font-size: 1.2rem;
    }

    /* Homepage responsive styles */
    .hero {
        padding: 0.5rem 1rem 0.5rem;
    }

    .hero-title {
        font-size: 1.25rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .hero-description {
        font-size: 0.95rem;
    }

    .content-grid {
        grid-template-columns: 1fr;
        padding: 2rem 1rem;
        gap: 1.5rem;
    }

    .content-card {
        padding: 2rem;
    }

    .cta-section {
        padding: 3rem 1.5rem 4rem;
    }

    .cta-section h2 {
        font-size: 2rem;
    }

    .cta-section p {
        font-size: 1.125rem;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .dark-mode-toggle {
        font-size: 1.3rem;
    }
}

/* Connection Management Styles */
.connection-type-tabs {
    display: flex;
    gap: 0.5rem;
    margin: 2rem 0 1rem;
    border-bottom: 2px solid var(--border-color);
}

.tab-button {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-button:hover {
    color: var(--text-primary);
}

.tab-button.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

.tab-content {
    display: none;
}

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

/* Autocomplete Styles */
.autocomplete-wrapper {
    position: relative;
}

.search-results {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 400px;
    overflow-y: auto;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: 0 4px 6px var(--shadow-md);
    z-index: 1000;
    margin-top: 0.25rem;
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

.search-result-item:hover {
    background-color: var(--bg-tertiary);
}

.search-result-item:last-child {
    border-bottom: none;
}

.result-id {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-bottom: 0.25rem;
}

.result-text {
    color: var(--text-primary);
    font-size: 0.9rem;
}

.no-results,
.search-error {
    padding: 1rem;
    text-align: center;
    color: var(--text-secondary);
}

.search-error {
    color: #dc2626;
}

.selected-idea {
    display: none;
    margin-top: 1rem;
}

.selected-idea.active {
    display: block;
}

.selected-idea-content {
    padding: 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.clear-selection {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.clear-selection:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

/* Multi-select ideas */
.selected-ideas {
    display: none;
    margin-top: 1rem;
}

.selected-ideas.active {
    display: block;
}

.selected-ideas-header {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.selected-idea-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
}

.selected-idea-item:hover {
    background: var(--bg-secondary);
    border-color: var(--accent-primary);
}

.selected-idea-text {
    flex: 1;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.remove-idea {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    margin-left: 1rem;
    transition: all 0.2s ease;
}

.remove-idea:hover {
    background: var(--border-color);
    color: #dc2626;
}

/* Connection list actions */
.connections-list {
    list-style: none;
    padding: 0;
}

.connection-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.connection-content {
    flex: 1;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.connection-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.btn-icon.delete:hover {
    border-color: #dc2626;
    color: #dc2626;
}

.connection-label {
    color: var(--accent-primary);
}

/* Edit Connection Styles */
.admin-edit-connection {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.current-connection {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.connection-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
}

.connection-part {
    flex: 1;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.connection-part p {
    margin: 0.5rem 0;
    color: var(--text-primary);
}

.connection-part small {
    color: var(--text-tertiary);
}

.connection-arrow {
    font-size: 2rem;
    color: var(--accent-primary);
    font-weight: bold;
}

.admin-add-connection,
.admin-edit-connection {
    max-width: 900px;
}

.parent-idea {
    background: var(--bg-tertiary);
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--accent-primary);
    transition: background-color 0.3s ease;
}

.parent-idea .idea-text {
    margin: 0.5rem 0;
    color: var(--text-primary);
}

/* ============================================================================
   MEDIA DISPLAY AND UPLOAD STYLES
   ============================================================================ */

/* Media section on idea cards */
.idea-media-section {
    margin-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.media-item {
    margin-bottom: 1.5rem;
}

.media-item:last-child {
    margin-bottom: 0;
}

/* Audio player */
.audio-item audio {
    width: 100%;
    max-width: 100%;
    border-radius: 6px;
}

/* Video player */
.video-item video {
    width: 100%;
    max-width: 100%;
    border-radius: 6px;
}

/* Embedded video (YouTube/Vimeo) */
.video-embed-item {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 6px;
}

.video-embed-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 6px;
}

.video-embed-wrapper iframe,
.video-embed-item iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Link items */
.link-item a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.link-item a:hover {
    background: var(--bg-secondary);
    border-color: var(--accent-primary);
}

.link-icon {
    font-size: 1.2rem;
    margin-right: 0.75rem;
}

.link-title {
    flex: 1;
}

.media-title {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Upload section (admin) */
.upload-section {
    margin-bottom: 1.5rem;
}

#mediaDropzone {
    border: 2px dashed var(--border-color);
    border-radius: 6px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-tertiary);
}

#mediaDropzone:hover,
#mediaDropzone.dragover {
    border-color: var(--accent-primary);
    background: var(--bg-secondary);
}

#mediaDropzone p {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-weight: 500;
}

#mediaDropzone small {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Upload progress */
.upload-progress {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
}

.progress-bar {
    height: 8px;
    background: var(--accent-primary);
    border-radius: 4px;
    transition: width 0.3s ease;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.progress-text {
    display: block;
    margin-top: 0.5rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* URL input sections */
.url-section,
.link-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
}

.url-section input,
.link-section input {
    width: 100%;
    margin-bottom: 0.75rem;
}

.url-section input:last-of-type,
.link-section input:last-of-type {
    margin-bottom: 0;
}

.url-section button,
.link-section button {
    margin-top: 0.75rem;
}

/* Attached media list (admin) */
.attached-media-list {
    margin-top: 1rem;
}

.no-media {
    padding: 1rem;
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
}

.media-item-admin {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
}

.media-item-admin:hover {
    background: var(--bg-secondary);
    border-color: var(--accent-primary);
}

.media-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
}

.media-title {
    flex: 1;
    color: var(--text-primary);
}

.delete-media-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.delete-media-btn:hover {
    background: var(--border-color);
    color: #dc2626;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .video-embed-wrapper,
    .video-embed-item {
        padding-bottom: 75%; /* Adjust aspect ratio for mobile */
    }

    #mediaDropzone {
        padding: 1.5rem 1rem;
    }
}

/* ============================================================================
   COMMENT SYSTEM STYLES
   ============================================================================ */

.comments-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.comments-section h3 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.comments-section h4 {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

/* Comment Form */
.comment-form {
    margin-bottom: 2rem;
}

.comment-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    min-height: 80px;
    margin-bottom: 0.5rem;
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.comment-limit-notice {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0.5rem 0;
    padding: 0.5rem;
    background-color: var(--bg-tertiary);
    border-radius: 4px;
}

.auth-prompt {
    font-size: 0.95rem;
    color: var(--text-secondary);
    padding: 1rem;
    background-color: var(--bg-tertiary);
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.auth-prompt a {
    color: var(--accent-primary);
    text-decoration: none;
}

.auth-prompt a:hover {
    text-decoration: underline;
}

/* Pending Comments */
.pending-comments {
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: var(--bg-tertiary);
    border-radius: 8px;
    border-left: 4px solid #f59e0b;
}

.pending-comments h4 {
    color: #f59e0b;
    font-size: 1rem;
    margin-bottom: 1rem;
}

/* Comments List */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.comment {
    padding: 1rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.comment.pending {
    background-color: var(--bg-tertiary);
    border-left: 4px solid #f59e0b;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.comment-header strong {
    color: var(--text-primary);
    font-weight: 600;
}

.comment-header small {
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

.comment p {
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0.5rem 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

.comment-meta small {
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

.comment-actions {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
}

.comment-actions a,
.comment-actions .btn-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 0.875rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}

.comment-actions a:hover,
.comment-actions .btn-link:hover {
    text-decoration: underline;
}

.comment-actions .admin-delete {
    color: #dc2626;
}

.no-comments {
    text-align: center;
    color: var(--text-tertiary);
    padding: 2rem;
    font-style: italic;
}

/* Comments Header with Watch Button */
.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.watch-section {
    display: flex;
    align-items: center;
}

.btn-watch,
.btn-watching {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-watching {
    background-color: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.btn-watch:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--accent-primary);
}

.btn-watching:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
}

/* Comment Wrapper and Structure */
.comment-wrapper {
    margin-bottom: 0.5rem;
}

.comment {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.comment-vote {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    min-width: 40px;
}

.vote-form {
    margin: 0;
    padding: 0;
}

.vote-btn {
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    transition: color 0.2s;
    line-height: 1;
}

.vote-btn.upvote:hover {
    color: #ff6b35;
}

.vote-btn.downvote:hover {
    color: #4361ee;
}

.vote-btn.upvote.active {
    color: #ff6b35;
    font-weight: bold;
}

.vote-btn.downvote.active {
    color: #4361ee;
    font-weight: bold;
}

.vote-arrow {
    color: var(--text-tertiary);
    font-size: 1.2rem;
    line-height: 1;
    cursor: help;
}

.score {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 30px;
    text-align: center;
}

.comment-content {
    flex: 1;
}

/* Threaded Comments */
.comment-wrapper.depth-0 {
    margin-left: 0;
}

.comment-wrapper.depth-1 .comment {
    border-left: 2px solid var(--accent-primary);
}

.comment-wrapper.depth-2 .comment,
.comment-wrapper.depth-3 .comment,
.comment-wrapper.depth-4 .comment,
.comment-wrapper.depth-5 .comment {
    border-left: 2px solid var(--border-color);
}

.comment-replies {
    margin-top: 0.5rem;
}

/* Collapsed Comments (heavily downvoted) */
.collapsed-comment {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    opacity: 0.7;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.collapsed-comment:hover {
    opacity: 1;
}

.collapsed-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

.expand-icon {
    font-weight: bold;
    color: var(--text-secondary);
}

.collapsed-text {
    font-style: italic;
}

.hidden-comment {
    /* Will be toggled via JavaScript */
}

/* Reply Form */
.reply-form {
    margin-top: 1rem;
    padding: 1rem;
    background-color: var(--bg-tertiary);
    border-radius: 4px;
}

.reply-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    min-height: 60px;
    margin-bottom: 0.5rem;
}

.reply-form textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.reply-form-actions {
    display: flex;
    gap: 0.5rem;
}

.reply-btn {
    color: var(--accent-primary);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    padding: 0;
    font-family: inherit;
}

.reply-btn:hover {
    text-decoration: underline;
}

/* Button Sizes */
.btn-small {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Auth Pages */
.auth-container {
    max-width: 500px;
    margin: 3rem auto;
    padding: 2rem;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow-sm);
}

.auth-container h1 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.auth-form input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.auth-form small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

.auth-link {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-secondary);
}

.auth-link a {
    color: var(--accent-primary);
    text-decoration: none;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* Profile Page */
.profile-container {
    max-width: 700px;
    margin: 2rem auto;
    padding: 2rem;
}

.profile-container h1 {
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.profile-info,
.profile-stats {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.profile-info p,
.profile-stats p {
    margin: 0.75rem 0;
    color: var(--text-primary);
}

.profile-stats h2 {
    color: var(--text-primary);
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.status-confirmed {
    color: #10b981;
    font-weight: 600;
}

.status-pending {
    color: #f59e0b;
    font-weight: 600;
}

.status-banned {
    color: #dc2626;
    font-weight: 600;
}

.status-active {
    color: #10b981;
    font-weight: 600;
}

.unlimited {
    color: #10b981;
    font-weight: 600;
    font-size: 1.1rem;
}

.profile-actions {
    margin-top: 2rem;
}

/* Comment Edit Page */
.comment-edit-container {
    max-width: 700px;
    margin: 2rem auto;
    padding: 2rem;
}

.comment-edit-container h1 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.original-idea {
    background-color: var(--bg-tertiary);
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.original-idea p {
    color: var(--text-secondary);
    margin: 0;
}

.comment-edit-form .form-group {
    margin-bottom: 1.5rem;
}

.comment-edit-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.comment-edit-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
}

.comment-edit-form textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

/* Admin Tables */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--shadow-sm);
}

.admin-table thead {
    background-color: var(--bg-tertiary);
}

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

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

.admin-table tbody tr:hover {
    background-color: var(--bg-tertiary);
}

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

.admin-comments,
.admin-users {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.admin-comments h1,
.admin-users h1 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

/* Admin Notifications */
.admin-notifications {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.notification-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background-color: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px var(--shadow-sm);
}

.notification-card:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 4px 12px var(--shadow-md);
    transform: translateY(-2px);
}

.notification-icon {
    position: relative;
    flex-shrink: 0;
}

.mailbox-icon {
    font-size: 3rem;
    line-height: 1;
    display: block;
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #dc2626;
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    min-width: 24px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.notification-content {
    flex: 1;
}

.notification-content h3 {
    color: var(--text-primary) !important;
    font-size: 1.25rem;
    margin: 0 0 0.5rem 0;
    font-weight: 600;
}

.notification-card .notification-content h3 {
    color: var(--text-primary) !important;
}

.notification-card:visited .notification-content h3 {
    color: var(--text-primary) !important;
}

.notification-stats {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.6;
}

.notification-stats strong {
    color: var(--accent-primary);
    font-size: 1.1rem;
}

.pending-count {
    color: #f59e0b;
    font-weight: 600;
}

.total-count {
    color: var(--text-tertiary);
}

/* Responsive */
@media (max-width: 768px) {
    .comments-section {
        padding: 1rem 0;
    }

    .comment {
        padding: 0.75rem;
    }

    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .comment-actions {
        flex-wrap: wrap;
    }

    .auth-container,
    .profile-container,
    .comment-edit-container {
        margin: 1rem;
        padding: 1.5rem;
    }

    .admin-table {
        font-size: 0.875rem;
    }

    .admin-table th,
    .admin-table td {
        padding: 0.5rem;
    }

    .admin-notifications {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .notification-card {
        padding: 1rem;
        gap: 1rem;
    }

    .mailbox-icon {
        font-size: 2.5rem;
    }
}
/* ============================================
   VIDEO PAGES STYLES
   ============================================ */

/* Video Gallery Page */
.videos-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.videos-header {
    text-align: center;
    padding: 3rem 0;
}

.videos-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.videos-header p {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.video-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text-primary);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 8px var(--shadow-sm);
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px var(--shadow-md);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background-size: cover;
    background-position: center;
    background-color: var(--bg-tertiary);
}

.video-thumbnail-default {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
}

.video-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    opacity: 0.5;
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
}

.video-info {
    padding: 1.5rem;
}

.video-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.video-info p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.video-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

/* Video Watch Page */
.video-watch-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

.video-container {
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
}

.video-player {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
}

.video-player video,
.video-player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-align: center;
}

.video-details {
    padding: 2rem;
}

.video-details h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.video-stats {
    display: flex;
    gap: 2rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.video-stats .stat {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.video-description {
    margin-top: 1.5rem;
}

.video-description h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.video-description p {
    line-height: 1.8;
    color: var(--text-secondary);
}

.video-sidebar {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    height: fit-content;
}

.video-sidebar h3 {
    margin-bottom: 1rem;
}

/* Admin Video Styles */
.admin-table .badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.admin-table .actions {
    white-space: nowrap;
}

.admin-table .actions .btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    margin-right: 0.25rem;
}

/* Form styles for admin video forms */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-info {
    background: var(--bg-tertiary);
    padding: 1rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.form-info p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* Responsive video styles */
@media (max-width: 1024px) {
    .video-watch-page {
        grid-template-columns: 1fr;
    }

    .video-sidebar {
        order: -1;
    }
}

@media (max-width: 768px) {
    .videos-header h1 {
        font-size: 2rem;
    }

    .videos-header p {
        font-size: 1rem;
    }

    .video-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .video-details h1 {
        font-size: 1.5rem;
    }

    .video-stats {
        flex-direction: column;
        gap: 0.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}
