/* ============================================
   PREMIUM UI ENHANCEMENTS
   Renegade Notes - Visual Upgrade
   ============================================ */

/* ============================================
   ENHANCED CARD STYLES
   ============================================ */
.item-card {
    position: relative;
    background: linear-gradient(145deg,
            rgba(26, 26, 46, 0.95),
            rgba(15, 15, 35, 0.98));
    border: 1px solid rgba(255, 51, 51, 0.15);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.item-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 1px;
    background: linear-gradient(135deg,
            rgba(255, 51, 51, 0.3),
            transparent 50%,
            rgba(255, 51, 51, 0.1));
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.item-card .card-content {
    padding: 1rem 1.25rem;
}

.item-card .card-content h3 {
    font-family: var(--font-punk);
    font-size: 1.15rem;
    letter-spacing: 0.03em;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.item-card .card-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.item-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid rgba(255, 51, 51, 0.1);
}

/* Card hover glow effect */
.item-card:hover {
    border-color: rgba(255, 51, 51, 0.4);
}

.item-card:hover::after {
    background: linear-gradient(135deg,
            rgba(255, 51, 51, 0.5),
            transparent 40%,
            rgba(255, 51, 51, 0.3));
}

/* ============================================
   ENHANCED BUTTON STYLES
   ============================================ */
.btn-primary {
    background: linear-gradient(135deg, #ff3333, #cc0000, #990000);
    background-size: 200% 200%;
    border: none;
    border-radius: 10px;
    padding: 0.85rem 2rem;
    font-family: var(--font-punk);
    font-size: 1rem;
    letter-spacing: 0.08em;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    box-shadow:
        0 4px 15px rgba(255, 51, 51, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent);
    transition: left 0.5s ease;
    pointer-events: none;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background-position: 100% 0;
    box-shadow:
        0 6px 25px rgba(255, 51, 51, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 0.8rem 1.8rem;
    font-family: var(--font-punk);
    letter-spacing: 0.05em;
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
    z-index: -1;
    pointer-events: none;
}

.btn-secondary:hover::before {
    transform: scaleX(1);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #4a0000, #2a0000);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 10px;
    padding: 0.8rem 1.8rem;
    color: #ff6666;
    font-family: var(--font-punk);
    letter-spacing: 0.05em;
    position: relative;
    overflow: hidden;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #660000, #4a0000);
    border-color: #ff0000;
    color: #ff4444;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.3);
}

/* Quick Add Buttons */
.quick-btn {
    background: linear-gradient(145deg,
            rgba(30, 30, 50, 0.9),
            rgba(20, 20, 40, 0.95));
    border: 1px solid rgba(255, 51, 51, 0.2);
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    color: var(--text-primary);
    font-family: var(--font-punk);
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.quick-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 51, 51, 0.5),
            transparent);
    pointer-events: none;
}

.quick-btn:hover {
    background: linear-gradient(145deg,
            rgba(255, 51, 51, 0.15),
            rgba(255, 51, 51, 0.08));
    border-color: var(--accent);
    color: white;
    box-shadow:
        0 0 30px rgba(255, 51, 51, 0.2),
        inset 0 0 20px rgba(255, 51, 51, 0.05);
}

/* ============================================
   ENHANCED SIDEBAR STYLES
   ============================================ */
.sidebar {
    background: linear-gradient(180deg,
            rgba(15, 15, 30, 0.98),
            rgba(10, 10, 25, 0.99));
    border-right: 1px solid rgba(255, 51, 51, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg,
            transparent,
            rgba(255, 51, 51, 0.3),
            rgba(255, 51, 51, 0.5),
            rgba(255, 51, 51, 0.3),
            transparent);
}

.nav-item {
    margin: 0.3rem 0.75rem;
    padding: 0.9rem 1rem;
    border-radius: 10px;
    background: transparent;
    position: relative;
    overflow: hidden;
}

.nav-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
            rgba(255, 51, 51, 0.1),
            transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.nav-item:hover::after {
    opacity: 1;
}

.nav-item.active {
    background: linear-gradient(90deg,
            rgba(255, 51, 51, 0.15),
            rgba(255, 51, 51, 0.05));
    border-left: 3px solid var(--accent);
}

.nav-item.active span {
    color: var(--accent);
}

/* ============================================
   ENHANCED STAT CARDS
   ============================================ */
.stat-card {
    background: linear-gradient(145deg,
            rgba(30, 30, 50, 0.8),
            rgba(20, 20, 40, 0.9));
    border: 1px solid rgba(255, 51, 51, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
            var(--accent),
            transparent);
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle,
            rgba(255, 51, 51, 0.1) 0%,
            transparent 70%);
    pointer-events: none;
}

.stat-number {
    font-family: var(--font-punk);
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--accent), #ff6666);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 0.5rem;
}

/* ============================================
   ENHANCED SEARCH BOX
   ============================================ */
.search-box {
    background: linear-gradient(145deg,
            rgba(30, 30, 50, 0.6),
            rgba(20, 20, 40, 0.8));
    border: 1px solid rgba(255, 51, 51, 0.15);
    border-radius: 12px;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    backdrop-filter: blur(10px);
}

.search-box:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(255, 51, 51, 0.2);
}

.search-input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.95rem;
    width: 100%;
}

.search-input:focus {
    outline: none;
}

.search-icon {
    color: var(--text-secondary);
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ============================================
   ENHANCED MODAL STYLES
   ============================================ */
.modal-content {
    background: linear-gradient(145deg,
            rgba(25, 25, 45, 0.98),
            rgba(15, 15, 35, 0.99));
    border: 1px solid rgba(255, 51, 51, 0.2);
    border-radius: 20px;
    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(255, 51, 51, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.modal-header {
    border-bottom: 1px solid rgba(255, 51, 51, 0.2);
    padding: 1.5rem 2rem;
    position: relative;
}

.modal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 2rem;
    right: 2rem;
    height: 1px;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 51, 51, 0.5),
            transparent);
}

.modal-header h2 {
    font-family: var(--font-punk);
    letter-spacing: 0.1em;
    color: var(--accent);
    text-shadow: 0 0 20px var(--accent-glow);
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 51, 51, 0.1);
    border: 1px solid rgba(255, 51, 51, 0.3);
    color: var(--accent);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--accent);
    color: white;
    transform: rotate(90deg);
}

/* ============================================
   ENHANCED FORM STYLES
   ============================================ */
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: rgba(10, 10, 25, 0.8);
    border: 1px solid rgba(255, 51, 51, 0.15);
    border-radius: 10px;
    padding: 0.9rem 1.1rem;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow:
        0 0 0 3px rgba(255, 51, 51, 0.1),
        0 0 20px rgba(255, 51, 51, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

/* File Upload Area */
.file-upload-area {
    background: rgba(10, 10, 25, 0.6);
    border: 2px dashed rgba(255, 51, 51, 0.2);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.file-upload-area:hover {
    border-color: var(--accent);
    background: rgba(255, 51, 51, 0.02);
}

.file-upload-area .upload-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ============================================
   ENHANCED HUD FRAME STYLES
   ============================================ */
.character-hud-frame {
    background: linear-gradient(145deg,
            rgba(15, 15, 30, 0.98),
            rgba(10, 10, 25, 0.99));
    border: 2px solid rgba(255, 51, 51, 0.3);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.character-hud-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(180deg,
            rgba(255, 51, 51, 0.1),
            transparent);
    pointer-events: none;
}

.hud-header {
    background: linear-gradient(90deg,
            rgba(255, 51, 51, 0.1),
            transparent);
    border-bottom: 1px solid rgba(255, 51, 51, 0.2);
    padding: 1.2rem 1.5rem;
}

.hud-header h2 {
    font-family: var(--font-punk);
    color: var(--accent);
    text-shadow: 0 0 30px var(--accent-glow);
}

.hud-status {
    background: linear-gradient(90deg, #00ff00, #00cc00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    animation: pulse 2s ease-in-out infinite;
}

/* ============================================
   ENHANCED RIGHT PANEL
   ============================================ */
.right-panel {
    background: linear-gradient(180deg,
            rgba(15, 15, 30, 0.95),
            rgba(10, 10, 25, 0.98));
    border-left: 1px solid rgba(255, 51, 51, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.right-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg,
            transparent,
            rgba(255, 51, 51, 0.3),
            rgba(255, 51, 51, 0.5),
            rgba(255, 51, 51, 0.3),
            transparent);
}

/* Calendar Enhancement */
.calendar-widget {
    background: rgba(20, 20, 40, 0.6);
    border: 1px solid rgba(255, 51, 51, 0.1);
    border-radius: 12px;
    padding: 1rem;
}

.calendar-day.today {
    background: var(--accent);
    color: white;
    border-radius: 50%;
    font-weight: 700;
}

/* Time Widget Enhancement */
.time-widget {
    background: linear-gradient(135deg,
            rgba(255, 51, 51, 0.1),
            rgba(20, 20, 40, 0.8));
    border: 1px solid rgba(255, 51, 51, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
}

.time-display {
    font-family: var(--font-punk);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
    text-shadow: 0 0 20px var(--accent-glow), 0 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.1em;
}

.date-display {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* ============================================
   ENHANCED WELCOME SECTION
   ============================================ */
.welcome-card {
    background: linear-gradient(145deg,
            rgba(30, 30, 50, 0.8),
            rgba(20, 20, 40, 0.9));
    border: 1px solid rgba(255, 51, 51, 0.2);
    border-radius: 20px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.welcome-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle,
            rgba(255, 51, 51, 0.15) 0%,
            transparent 70%);
}

.welcome-card h1 {
    font-family: var(--font-punk);
    font-size: 2.2rem;
    letter-spacing: 0.05em;
}

.welcome-card h1 span {
    color: var(--accent);
    text-shadow: 0 0 20px var(--accent-glow);
}

.welcome-card p {
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.date-card {
    background: linear-gradient(135deg, var(--accent), #cc0000);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    color: white;
    box-shadow: 0 10px 30px rgba(255, 51, 51, 0.3);
}

.date-month {
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    opacity: 0.9;
}

.date-day {
    font-family: var(--font-punk);
    font-size: 3.5rem;
    line-height: 1;
    margin-top: 0.25rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* ============================================
   ENHANCED TAGS
   ============================================ */
.tag {
    background: linear-gradient(135deg,
            rgba(255, 51, 51, 0.15),
            rgba(255, 51, 51, 0.08));
    border: 1px solid rgba(255, 51, 51, 0.3);
    border-radius: 20px;
    padding: 0.35rem 0.8rem;
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 500;
    backdrop-filter: blur(5px);
}

.tag:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* ============================================
   ENHANCED SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(20, 20, 40, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg,
            rgba(255, 51, 51, 0.4),
            rgba(255, 51, 51, 0.2));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg,
            rgba(255, 51, 51, 0.6),
            rgba(255, 51, 51, 0.4));
}

/* ============================================
   LIGHT THEME ENHANCEMENTS
   ============================================ */
body.light-theme .item-card {
    background: linear-gradient(145deg,
            rgba(255, 255, 255, 0.95),
            rgba(245, 245, 250, 0.98));
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

body.light-theme .stat-card {
    background: linear-gradient(145deg,
            rgba(255, 255, 255, 0.9),
            rgba(245, 245, 250, 0.95));
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

body.light-theme .sidebar {
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.98),
            rgba(245, 245, 250, 0.99));
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.05);
}

body.light-theme .quick-btn {
    background: linear-gradient(145deg,
            rgba(255, 255, 255, 0.95),
            rgba(245, 245, 250, 0.98));
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

body.light-theme .search-box {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

body.light-theme .modal-content {
    background: linear-gradient(145deg,
            rgba(255, 255, 255, 0.98),
            rgba(250, 250, 255, 0.99));
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15);
}

body.light-theme .welcome-card {
    background: linear-gradient(145deg,
            rgba(255, 255, 255, 0.95),
            rgba(245, 245, 250, 0.98));
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

body.light-theme .calendar-widget,
body.light-theme .time-widget {
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}