/* Renegade Studios - Main Styles */
:root {
    --bg-dark: #0a0a0a;
    --bg-card: #141414;
    --bg-card-hover: #1a1a1a;
    --bg-sidebar: #0d0d0d;
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --accent: #ff3333;
    --accent-dark: #cc0000;
    --accent-glow: rgba(255, 51, 51, 0.4);
    --border: #2a2a2a;
    --success: #22c55e;
    --danger: #ef4444;
    --font-punk: 'Bangers', 'Impact', cursive;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Punk Font for all headings */
h1,
h2,
h3,
h4,
h5,
h6,
.login-title,
.sidebar-brand,
.view-header h1,
.stat-label,
.item-title,
.detail-title,
.modal-header h2 {
    font-family: var(--font-punk);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Dotted Pattern Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle, rgba(255, 51, 51, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
    z-index: 0;
}

/* Hero Background Image */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 240px;
    right: 300px;
    bottom: 0;
    background:
        linear-gradient(to right, rgba(10, 10, 10, 0.95) 0%, rgba(10, 10, 10, 0.7) 20%, rgba(10, 10, 10, 0.5) 50%, rgba(10, 10, 10, 0.7) 80%, rgba(10, 10, 10, 0.95) 100%),
        linear-gradient(to bottom, rgba(10, 10, 10, 0.9) 0%, rgba(10, 10, 10, 0.3) 30%, rgba(10, 10, 10, 0.3) 70%, rgba(10, 10, 10, 0.9) 100%),
        url('hero-bg.png');
    background-size: cover, cover, cover;
    background-position: center, center, center top;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
}

/* Login Screen */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0000 50%, #0a0a0a 100%);
    z-index: 1000;
}

.login-container {
    text-align: center;
    padding: 3rem;
    border-radius: 20px;
    background: rgba(20, 20, 20, 0.9);
    border: 1px solid var(--border);
    backdrop-filter: blur(20px);
    box-shadow: 0 0 60px rgba(255, 51, 51, 0.15);
}

.login-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-logo.spinning {
    animation: spinLogin 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes spinLogin {
    0% {
        transform: perspective(500px) rotateY(0deg) scale(1);
        filter: drop-shadow(0 0 10px var(--accent));
    }

    50% {
        transform: perspective(500px) rotateY(540deg) scale(1.3);
        filter: drop-shadow(0 0 40px var(--accent));
    }

    100% {
        transform: perspective(500px) rotateY(1080deg) scale(0.8);
        filter: drop-shadow(0 0 60px var(--accent));
        opacity: 0;
    }
}

.fire-icon {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 15px var(--accent-glow));
}

.fire-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 15px var(--accent-glow));
}

.fire-logo-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 15px var(--accent-glow));
}

.sidebar-logo-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 8px var(--accent-glow));
}

.login-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff, #ff6666);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 300px;
    margin: 0 auto;
}

.password-input {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-dark);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.password-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}

.login-btn {
    padding: 1rem 2rem;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--accent-glow);
}

.error-message {
    color: var(--danger);
    margin-top: 1rem;
    min-height: 1.5rem;
}

/* Login Fade Out */
.login-screen.fade-out {
    animation: fadeOut 0.5s ease forwards;
    animation-delay: 1.2s;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        pointer-events: none;
    }
}

/* Dashboard Layout */
.dashboard {
    display: grid;
    grid-template-columns: 240px 1fr 300px;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.hidden {
    display: none !important;
}

.dashboard.show {
    display: grid;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Sidebar */
.sidebar {
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.sidebar-logo {
    width: 36px;
    height: 36px;
}

.sidebar-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 8px var(--accent-glow));
}

.sidebar-brand {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    position: relative;
    /* For z-index context if needed */
    overflow: hidden;
    /* Ensure bg stays inside */
}

.nav-item:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.nav-item.active {
    background-image: url('../assets/tab_bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    /* Ensure text is visible on potentially dark bg */
    border: none;
    /* Remove border to let image shine */
    box-shadow: 0 0 15px rgba(255, 51, 51, 0.3);
    /* Add subtle glow matching theme */
}

/* NEW: Logo Image Classes */
.fire-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 15px var(--accent-glow));
    mix-blend-mode: screen;
    /* Ensures black background is transparent */
}

.sidebar-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 8px var(--accent-glow));
    mix-blend-mode: screen;
    /* Ensures black background is transparent */
}

/* NEW: Title Image Class */
.login-title-img {
    max-width: 300px;
    width: 100%;
    height: auto;
    margin-bottom: 0.5rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
    object-fit: contain;
    mix-blend-mode: screen;
    /* Ensures black background is transparent */
}

.nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 10px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    width: 100%;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
    color: var(--danger);
}

/* Main Content */
.main-content {
    padding: 1.5rem;
    overflow-y: auto;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    width: 300px;
}

.search-icon {
    width: 18px;
    height: 18px;
    stroke: var(--text-secondary);
    flex-shrink: 0;
}

.search-box .search-input {
    border: none;
    background: transparent;
    padding: 0;
    width: 100%;
}

.search-box .search-input:focus {
    outline: none;
}

.search-box:focus-within {
    border-color: var(--accent);
}

.header-info {
    display: flex;
    gap: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Welcome Section */
.welcome-section {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.welcome-card {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(255, 51, 51, 0.1) 100%);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid var(--border);
}

.welcome-card h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.welcome-card h1 span {
    color: var(--accent);
}

.welcome-card p {
    color: var(--text-secondary);
}

.date-card {
    background: linear-gradient(135deg, var(--accent-dark), var(--accent));
    border-radius: 16px;
    padding: 1.5rem 2rem;
    text-align: center;
    min-width: 120px;
}

.date-month {
    font-size: 0.9rem;
    opacity: 0.9;
}

.date-day {
    font-size: 2.5rem;
    font-weight: 700;
}

/* Stats Section */
.stats-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Quick Add Section */
.quick-add-section {
    margin-bottom: 1.5rem;
}

.quick-add-section h2,
.recent-section h2 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.quick-add-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.quick-btn {
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.quick-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
    transform: translateY(-2px);
}

/* Recent Section */
.recent-section {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--border);
}

.recent-list {
    min-height: 100px;
}

.empty-msg {
    color: var(--text-secondary);
    text-align: center;
    padding: 2rem;
}

/* Category Views */
.view {
    display: none;
}

.view.active {
    display: block;
}

.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.view-header h1 {
    font-size: 1.75rem;
}

.add-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px var(--accent-glow);
}

.add-btn.small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.category-note {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Items Grid */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.25rem;
}

.item-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.3s ease;
}

.item-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.item-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    background: var(--bg-dark);
}

.item-body {
    padding: 1rem;
}

.item-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.item-desc {
    color: var(--text-secondary);
    font-size: 0.85rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.music-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
}

.music-icon {
    width: 40px;
    height: 40px;
    color: var(--accent);
}

.music-icon svg {
    width: 100%;
    height: 100%;
}

.music-info {
    flex: 1;
}

.music-info .item-title {
    margin-bottom: 0.25rem;
}

/* Right Panel */
.right-panel {
    background: var(--bg-sidebar);
    border-left: 1px solid var(--border);
    padding: 1.5rem;
}

.user-widget {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.user-avatar {
    width: 48px;
    height: 48px;
    color: var(--text-secondary);
}

.user-avatar svg {
    width: 100%;
    height: 100%;
}

.user-display-name {
    font-weight: 600;
    display: block;
}

.user-status {
    color: var(--success);
    font-size: 0.8rem;
}

.calendar-widget {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.calendar-header {
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}

.calendar-dates {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
}

.calendar-date {
    padding: 0.4rem;
    text-align: center;
    font-size: 0.8rem;
    border-radius: 6px;
}

.calendar-date.today {
    background: var(--accent);
    font-weight: 600;
}

.calendar-date.empty {
    opacity: 0;
}

.time-widget {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.time-display {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
}

.date-display {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
}

.modal-content {
    position: relative;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h2 {
    font-size: 1.25rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-dark);
    color: var(--text-primary);
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.file-upload-area {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload-area:hover {
    border-color: var(--accent);
    background: rgba(255, 51, 51, 0.05);
}

.upload-text {
    color: var(--text-secondary);
}

.preview {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    margin-top: 1rem;
}

.music-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-dark);
    border-radius: 8px;
    margin-top: 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.btn-primary {
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
    cursor: pointer;
    font-weight: 600;
}

.btn-secondary {
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
}

.btn-danger {
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    border: none;
    background: var(--danger);
    color: white;
    cursor: pointer;
}

/* Detail Modal - Enhanced for Better Viewing */
.detail-body {
    margin-bottom: 1.5rem;
}

#detail-modal .modal-content {
    max-width: 700px;
    width: 95%;
    max-height: 95vh;
    padding: 2.5rem;
}

#detail-modal .modal-header h2 {
    font-size: 2.5rem;
    color: var(--accent);
    text-shadow: 2px 2px 0 #000, -1px -1px 0 #000;
}

.detail-image {
    width: 100%;
    max-height: 450px;
    object-fit: contain;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border: 2px solid var(--border);
    background: var(--bg-dark);
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.detail-image:hover {
    transform: scale(1.02);
}

#detail-description {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-primary);
    white-space: pre-wrap;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border-left: 4px solid var(--accent);
    margin-bottom: 1rem;
}

#detail-date {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 1rem;
}

#detail-audio {
    width: 100%;
    margin: 1rem 0;
    padding: 0.5rem;
    border-radius: 8px;
    background: rgba(255, 51, 51, 0.1);
    border: 1px solid var(--accent);
}

#detail-audio:not(.hidden) {
    display: block !important;
}

/* ============================================
   SCI-FI HUD FRAME FOR CHARACTER VIEWER
   ============================================ */
.character-hud-frame {
    position: relative;
    background: linear-gradient(135deg, rgba(10, 10, 10, 0.95), rgba(20, 5, 5, 0.98));
    border: 2px solid var(--accent);
    padding: 2rem;
    clip-path: polygon(0 25px, 25px 0,
            calc(100% - 25px) 0, 100% 25px,
            100% calc(100% - 25px), calc(100% - 25px) 100%,
            25px 100%, 0 calc(100% - 25px));
    box-shadow:
        0 0 30px var(--accent-glow),
        inset 0 0 60px rgba(255, 51, 51, 0.05);
}

/* Grid overlay */
.character-hud-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(255, 51, 51, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 51, 51, 0.03) 1px, transparent 1px);
    background-size: 25px 25px;
    pointer-events: none;
    opacity: 0.5;
}

/* Dot pattern overlay */
.character-hud-frame::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(rgba(255, 51, 51, 0.15) 1px, transparent 1px);
    background-size: 15px 15px;
    pointer-events: none;
    opacity: 0.3;
}

/* Corner accents */
.hud-corner {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 2px solid var(--accent);
    pointer-events: none;
}

.hud-corner-tl {
    top: -2px;
    left: -2px;
    border-right: none;
    border-bottom: none;
}

.hud-corner-tr {
    top: -2px;
    right: -2px;
    border-left: none;
    border-bottom: none;
}

.hud-corner-bl {
    bottom: -2px;
    left: -2px;
    border-right: none;
    border-top: none;
}

.hud-corner-br {
    bottom: -2px;
    right: -2px;
    border-left: none;
    border-top: none;
}

/* Side accent lines */
.hud-line-left {
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 200px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hud-line-left span {
    display: block;
    width: 100%;
    height: 4px;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

.hud-line-right {
    position: absolute;
    right: -25px;
    top: 20%;
    width: 15px;
    height: 60%;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hud-line-right span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--accent);
    transform: skewY(-45deg);
    box-shadow: 0 0 8px var(--accent);
}

/* Info panel on side */
.hud-info-panel {
    position: absolute;
    right: -80px;
    top: 60%;
    width: 60px;
    height: 120px;
    background: linear-gradient(135deg, rgba(255, 51, 51, 0.1), rgba(0, 0, 0, 0.8));
    border: 1px solid var(--accent);
    border-radius: 4px;
}

/* Crosshair indicator */
.hud-crosshair {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
}

.hud-crosshair::before,
.hud-crosshair::after {
    content: '';
    position: absolute;
    background: var(--accent);
    box-shadow: 0 0 6px var(--accent);
}

.hud-crosshair::before {
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    transform: translateY(-50%);
}

.hud-crosshair::after {
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    transform: translateX(-50%);
}

/* Glowing frame effect */
.hud-glow-frame {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 1px solid rgba(255, 51, 51, 0.3);
    border-radius: 4px;
    pointer-events: none;
    animation: hudPulse 3s ease-in-out infinite;
}

@keyframes hudPulse {

    0%,
    100% {
        box-shadow: inset 0 0 20px rgba(255, 51, 51, 0.1);
    }

    50% {
        box-shadow: inset 0 0 40px rgba(255, 51, 51, 0.2);
    }
}

/* Character detail with HUD */
#detail-modal.character-modal .modal-content {
    max-width: 850px;
    background: transparent;
    border: none;
    padding: 0;
    overflow: visible;
}

#detail-modal.character-modal .character-hud-frame {
    padding: 2rem 2.5rem;
}

/* Header with HUD styling */
.hud-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 51, 51, 0.3);
}

.hud-header h2 {
    font-family: var(--font-punk);
    font-size: 2.5rem;
    color: var(--accent);
    text-shadow: 0 0 20px var(--accent-glow), 2px 2px 0 #000;
    letter-spacing: 0.1em;
    margin: 0;
}

.hud-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--success);
    font-size: 0.9rem;
    font-family: var(--font-body);
}

.hud-status::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: statusBlink 2s infinite;
}

@keyframes statusBlink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

/* Content area */
.hud-content {
    position: relative;
    z-index: 1;
}

.hud-image-container {
    position: relative;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 51, 51, 0.4);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-dark);
}

.hud-image-container img {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    display: block;
}

.hud-image-scanline {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    animation: scanline 3s linear infinite;
}

@keyframes scanline {
    0% {
        top: 0;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        top: 100%;
        opacity: 0;
    }
}

/* Description box */
.hud-description {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 51, 51, 0.3);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    position: relative;
}

.hud-description::before {
    content: 'BIO';
    position: absolute;
    top: -10px;
    left: 15px;
    background: var(--bg-dark);
    padding: 0 10px;
    color: var(--accent);
    font-family: var(--font-punk);
    font-size: 0.9rem;
    letter-spacing: 0.2em;
}

.hud-description p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
    white-space: pre-wrap;
    margin: 0;
}

/* Footer with actions */
.hud-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 51, 51, 0.3);
}

.hud-meta {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.hud-actions {
    display: flex;
    gap: 1rem;
}

.detail-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Activity Item */
.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    background: var(--bg-dark);
    margin-bottom: 0.5rem;
}

.activity-icon {
    width: 24px;
    height: 24px;
    color: var(--accent);
    flex-shrink: 0;
}

.activity-icon svg {
    width: 100%;
    height: 100%;
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.empty-icon {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    opacity: 0.5;
}

.activity-info {
    flex: 1;
}

.activity-title {
    font-weight: 500;
}

.activity-time {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 1200px) {
    .dashboard {
        grid-template-columns: 220px 1fr;
    }

    .right-panel {
        display: none;
    }
}

@media (max-width: 768px) {
    .dashboard {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }

    .stats-section,
    .quick-add-buttons {
        grid-template-columns: repeat(2, 1fr);
    }

    .welcome-section {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   SCI-FI DOOR TRANSITION ANIMATION
   ============================================ */
.door-transition {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    pointer-events: none;
    display: none;
}

.door-transition.active {
    display: flex;
    pointer-events: all;
}

.door-panel {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0505 50%, #0a0a0a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid var(--accent-dark);
}

.door-left {
    left: 0;
    transform: translateX(-100%);
    border-right: 3px solid var(--accent);
    box-shadow: 5px 0 30px var(--accent-glow);
}

.door-right {
    right: 0;
    transform: translateX(100%);
    border-left: 3px solid var(--accent);
    box-shadow: -5px 0 30px var(--accent-glow);
}

/* Door closing animation */
.door-transition.closing .door-left {
    animation: doorCloseLeft 0.6s ease-out forwards;
}

.door-transition.closing .door-right {
    animation: doorCloseRight 0.6s ease-out forwards;
}

/* Door opening animation */
.door-transition.opening .door-left {
    animation: doorOpenLeft 0.6s ease-in forwards;
}

.door-transition.opening .door-right {
    animation: doorOpenRight 0.6s ease-in forwards;
}

@keyframes doorCloseLeft {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(0);
    }
}

@keyframes doorCloseRight {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(0);
    }
}

@keyframes doorOpenLeft {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

@keyframes doorOpenRight {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Circuit lines */
.circuit-lines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.3;
}

.circuit-lines svg {
    width: 100%;
    height: 100%;
}

.circuit {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
}

.door-transition.closing .circuit {
    animation: drawCircuit 0.8s ease-out 0.3s forwards;
}

.door-transition.opening .circuit {
    stroke-dashoffset: 0;
    animation: eraseCircuit 0.4s ease-in forwards;
}

@keyframes drawCircuit {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes eraseCircuit {
    to {
        stroke-dashoffset: 1000;
    }
}

.node {
    fill: var(--accent);
    opacity: 0;
}

.door-transition.closing .node {
    animation: pulseNode 0.3s ease-out 0.6s forwards;
}

@keyframes pulseNode {
    0% {
        opacity: 0;
        transform: scale(0);
    }

    50% {
        opacity: 1;
        transform: scale(1.5);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Door accent line */
.door-accent {
    position: absolute;
    width: 4px;
    height: 60%;
    background: linear-gradient(to bottom, transparent, var(--accent), var(--accent), transparent);
    box-shadow: 0 0 20px var(--accent), 0 0 40px var(--accent-glow);
}

.door-left .door-accent {
    right: 20px;
}

.door-right .door-accent {
    left: 20px;
}

/* Door text */
.door-text {
    font-family: var(--font-punk);
    font-size: 4rem;
    color: var(--accent);
    text-shadow: 0 0 20px var(--accent-glow), 2px 2px 0 #000;
    letter-spacing: 0.2em;
    opacity: 0;
    transform: scale(0.8);
}

.door-transition.closing .door-text {
    animation: revealText 0.4s ease-out 0.4s forwards;
}

.door-transition.opening .door-text {
    opacity: 1;
    transform: scale(1);
    animation: hideText 0.3s ease-in forwards;
}

@keyframes revealText {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes hideText {
    to {
        opacity: 0;
        transform: scale(1.2);
    }
}

/* Center line glow */
.door-center-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    transform: translateX(-50%);
    background: var(--accent);
    box-shadow: 0 0 30px var(--accent), 0 0 60px var(--accent-glow);
    opacity: 0;
}

.door-transition.closing .door-center-line {
    animation: glowLine 0.2s ease-out 0.5s forwards, fadeGlow 0.3s ease-in 0.8s forwards;
}

@keyframes glowLine {
    to {
        opacity: 1;
    }
}

@keyframes fadeGlow {
    to {
        opacity: 0;
    }
}

/* Grid pattern overlay */
.door-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(255, 51, 51, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 51, 51, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
}

/* Diagonal accent stripes */
.door-panel::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(45deg,
            transparent,
            transparent 100px,
            rgba(255, 51, 51, 0.02) 100px,
            rgba(255, 51, 51, 0.02) 200px);
    pointer-events: none;
}

/* ============================================
   YOUTUBE MUSIC PLAYER WIDGET
   ============================================ */
.youtube-player-widget {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
}

.youtube-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
    color: var(--accent);
    font-family: var(--font-punk);
    font-size: 1.1rem;
    letter-spacing: 0.1em;
}

.youtube-icon {
    width: 20px;
    height: 20px;
    fill: var(--accent);
}

.youtube-input-wrapper {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.youtube-url-input {
    flex: 1;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.6rem 0.8rem;
    color: var(--text-primary);
    font-size: 0.85rem;
    transition: border-color 0.3s ease;
}

.youtube-url-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

.youtube-url-input::placeholder {
    color: var(--text-secondary);
}

.youtube-load-btn {
    background: var(--accent);
    border: none;
    border-radius: 6px;
    padding: 0 0.8rem;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.youtube-load-btn:hover {
    background: var(--accent-hover);
    box-shadow: 0 0 15px var(--accent-glow);
    transform: scale(1.05);
}

.youtube-player-container {
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    display: none;
}

.youtube-player-container.active {
    display: block;
}

.youtube-embed {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
}

.youtube-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

.youtube-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-align: center;
    gap: 0.5rem;
}

.youtube-placeholder svg {
    width: 30px;
    height: 30px;
    opacity: 0.5;
}

/* ============================================
   VIEW BUTTON STYLING
   ============================================ */
.btn-view {
    background: linear-gradient(135deg, #2196f3, #1976d2);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-punk);
    letter-spacing: 0.05em;
}

.btn-view:hover {
    background: linear-gradient(135deg, #42a5f5, #2196f3);
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.4);
    transform: translateY(-2px);
}

/* Full View Modal */
.full-view-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(5, 5, 15, 0.98);
    z-index: 10000;
    display: none;
    overflow-y: auto;
}

.full-view-modal.active {
    display: block;
}

.full-view-wrapper {
    min-height: 100vh;
    padding: 2rem;
    position: relative;
}

.full-view-close {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--accent);
    border: none;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.full-view-close:hover {
    background: var(--accent-hover);
    transform: scale(1.1);
}

.full-view-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.full-view-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--accent);
}

.full-view-header h1 {
    font-family: var(--font-punk);
    font-size: 3rem;
    color: var(--accent);
    text-shadow: 0 0 30px var(--accent-glow), 3px 3px 0 #000;
    margin: 0 0 0.5rem 0;
    letter-spacing: 0.1em;
}

.full-view-date {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.full-view-body {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.full-view-image-container {
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border);
}

.full-view-image {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
    border-radius: 8px;
    border: 2px solid var(--accent);
    box-shadow: 0 0 40px var(--accent-glow);
}

.full-view-audio-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border);
}

.full-view-audio-container audio {
    width: 100%;
}

.full-view-description-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border);
}

.full-view-description-container h3 {
    font-family: var(--font-punk);
    color: var(--accent);
    margin: 0 0 1rem 0;
    font-size: 1.3rem;
    letter-spacing: 0.1em;
}

.full-view-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
    white-space: pre-wrap;
    margin: 0;
}

/* YouTube Local Testing Notice */
.youtube-local-notice {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.2rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.youtube-notice-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.youtube-local-notice p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 0.2rem 0;
}

.youtube-notice-sub {
    opacity: 0.7;
    font-size: 0.75rem !important;
}

.youtube-open-link {
    display: inline-block;
    margin-top: 0.8rem;
    padding: 0.6rem 1.2rem;
    background: var(--accent);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-family: var(--font-punk);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.youtube-open-link:hover {
    background: var(--accent-hover);
    box-shadow: 0 0 15px var(--accent-glow);
    transform: scale(1.05);
}

/* YouTube Player Widget */
.youtube-player-widget {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1.5rem;
    border: 1px solid var(--border);
}

.youtube-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--accent);
    font-weight: 600;
}

.youtube-icon {
    width: 20px;
    height: 20px;
}

.youtube-input-wrapper {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.youtube-url-input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-dark);
    color: var(--text-primary);
    font-size: 0.85rem;
}

.youtube-url-input:focus {
    outline: none;
    border-color: var(--accent);
}

.youtube-load-btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: none;
    background: var(--accent);
    color: white;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.youtube-load-btn:hover {
    background: var(--accent-dark);
    box-shadow: 0 0 10px var(--accent-glow);
}

.youtube-player-container {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
}

.youtube-embed {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.youtube-embed iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Pin Badge & Tags */
.pin-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 1.2rem;
    z-index: 10;
}

.item-card.pinned {
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(255, 51, 51, 0.2);
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

.tag {
    background: rgba(255, 51, 51, 0.2);
    color: var(--accent);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    border: 1px solid rgba(255, 51, 51, 0.3);
}

/* Checkbox Group */
.checkbox-group {
    margin-bottom: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

/* Theme Toggle Styles */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.theme-toggle:hover {
    color: var(--text-primary);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

/* Light Theme Variables */
body.light-theme {
    --bg-dark: #f5f5f5;
    --bg-card: #ffffff;
    --bg-card-hover: #f0f0f0;
    --bg-sidebar: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --border: #e0e0e0;
}

body.light-theme::before {
    background-image: radial-gradient(circle, rgba(255, 51, 51, 0.05) 1px, transparent 1px);
}

body.light-theme::after {
    opacity: 0.15;
}