:root {
    /* Modern Light Theme Defaults */
    --linka-theme-bg: #f9f9f9;
    --linka-theme-surface: #ffffff;
    --linka-theme-text: #1a1a1a;
    --linka-theme-text-secondary: #666666;
    --linka-theme-border: #e6e6e6;
    --linka-theme-primary: #000000;
    /* Monochrome Primary */
    --linka-theme-accent: #000000;
    --linka-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --linka-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.06);
}

/* Management Page Container */
.linka-management-page {
    background: var(--linka-theme-bg);
    min-height: 100vh;
    color: var(--linka-theme-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.linka-modal-content {
    background: transparent;
    /* Let page bg show */
    box-shadow: none;
    padding: 20px 0;
}

.linka-management-header {
    background: var(--linka-theme-bg);
    /* Match page bg */
    padding: 10px 0;
}

/* Back Button - Moved to Unified Section */

/* Hero Stat - Refined */
.linka-hero-stat {
    background: var(--linka-theme-surface) !important;
    /* Override inline styles */
    border: 1px solid var(--linka-theme-border) !important;
    box-shadow: var(--linka-shadow-md) !important;
    border-radius: 20px !important;
    padding: 40px 20px !important;
}

.linka-hero-stat div:first-child {
    /* Label */
    font-size: 0.8em !important;
    font-weight: 600 !important;
    letter-spacing: 1.5px !important;
    color: var(--linka-theme-text-secondary) !important;
}

.linka-hero-stat div:nth-child(2) {
    /* Number */
    font-size: 4rem !important;
    font-weight: 300 !important;
    /* Lighter font weight for modern look */
    color: var(--linka-theme-primary) !important;
    margin: 10px 0 !important;
}

/* Grid & Cards */
.linka-stats-grid {
    gap: 15px;
}

.linka-stat-card {
    background: var(--linka-theme-surface);
    border: 1px solid var(--linka-theme-border);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--linka-shadow-sm);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.linka-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--linka-shadow-md);
    border-color: #d0d0d0;
}

.linka-stat-card-clickable {
    transition: all 0.3s ease;
}

.linka-stat-card-clickable:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    border-color: var(--linka-theme-primary);
}

.linka-stat-card-clickable.active {
    border-color: var(--linka-theme-primary);
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.linka-stat-card-clickable.active .linka-stat-number {
    color: var(--linka-theme-primary);
}

.linka-stat-title {
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--linka-theme-text-secondary);
    letter-spacing: 0.5px;
}

.linka-stat-number {
    font-size: 2rem !important;
    font-weight: 700;
    color: var(--linka-theme-text) !important;
    margin: 10px 0;
}

/* Chart Container */
.linka-chart-container {
    background: var(--linka-theme-surface);
    border: 1px solid var(--linka-theme-border);
    border-radius: 20px;
    padding: 25px;
    box-shadow: var(--linka-shadow-sm);
    margin-top: 30px;
}

.linka-chart-header h3 {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--linka-theme-text);
}

.linka-chart-tabs {
    background: var(--linka-theme-bg);
    padding: 4px;
    border-radius: 30px;
}

.linka-chart-tab.active {
    background: var(--linka-theme-surface);
    color: var(--linka-theme-text);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-radius: 20px;
}

/* Trend Indicators */
.linka-trend-up {
    color: #000;
}

.linka-trend-down {
    color: #888;
}

.linka-trend-neutral {
    color: #ccc;
}

/* Minimalist Card Styles (Restored) */
.linka-mini-card {
    background: var(--linka-theme-surface);
    border: 1px solid var(--linka-theme-border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Back Button - Unified Black & White */
.linka-back-btn {
    background: #ffffff;
    /* White BG */
    color: #000000;
    /* Black Text */
    border: 1px solid #000000;
    /* Black Border */
    box-shadow: none;
    /* Flat/Clean */
    border-radius: 30px;
    padding: 8px 16px;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.linka-back-btn:hover {
    background: #000000;
    /* Invert on hover */
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.linka-mini-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-color: var(--linka-primary);
}

.linka-mini-card-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: var(--linka-bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.linka-mini-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.linka-mini-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--linka-text-secondary);
    background: linear-gradient(135deg, var(--linka-bg-secondary) 0%, var(--linka-bg-elevated) 100%);
}

.linka-mini-card-content {
    padding: 1.25rem;
    flex: 1;
}

.linka-mini-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--linka-text-primary);
    margin: 0 0 0.5rem 0;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
}

.linka-mini-card-stats {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--linka-border);
}

.linka-mini-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--linka-text-secondary);
}

.linka-mini-stat-icon {
    font-size: 1.125rem;
}

.linka-mini-stat-value {
    font-weight: 600;
    color: var(--linka-text-primary);
    font-size: 1rem;
}

.linka-mini-stat-label {
    color: var(--linka-text-secondary);
}

.linka-mini-card-edit {
    width: 100%;
    padding: 0.875rem;
    background: var(--linka-primary);
    color: white;
    border: none;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.linka-mini-card-edit:hover {
    background: var(--linka-primary-dark);
}

.linka-edit-icon {
    font-size: 1.125rem;
}

/* Fullscreen Modal */
.linka-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.linka-modal.active {
    display: flex;
    opacity: 1;
}

.linka-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    animation: linkaFadeIn 0.3s ease-out;
}

.linka-modal-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow-y: auto;
}

.linka-modal-close {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100001;
}

.linka-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.linka-modal-content {
    background: var(--linka-bg-primary);
    border-radius: 16px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2.5rem;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Staggered Modal Sections */
.linka-modal-section {
    animation: linkaFadeInUp 0.5s ease-out backwards;
}

.linka-modal-section:nth-child(1) {
    animation-delay: 0.1s;
}

.linka-modal-section:nth-child(2) {
    animation-delay: 0.2s;
}

.linka-modal-section:nth-child(3) {
    animation-delay: 0.3s;
}

.linka-modal-section:nth-child(4) {
    animation-delay: 0.4s;
}

.linka-modal-section:nth-child(5) {
    animation-delay: 0.5s;
}

/* Modal Content Sections */
.linka-modal-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--linka-border);
}

.linka-modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--linka-text-primary);
    margin: 0 0 0.5rem 0;
}

.linka-modal-subtitle {
    font-size: 0.9375rem;
    color: var(--linka-text-secondary);
    margin: 0;
}

.linka-modal-section {
    margin-bottom: 2rem;
}

.linka-modal-section:last-child {
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .linka-devices-grid {
        grid-template-columns: 1fr;
    }

    .linka-modal-container {
        padding: 1rem;
    }

    .linka-modal-content {
        padding: 1.5rem;
        max-height: 95vh;
    }

    .linka-modal-close {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }
}

/* Animation for modal */
@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered animation for stat cards */
.linka-stats-grid .linka-stat-card:nth-child(1) {
    animation-delay: 0.1s;
}

.linka-stats-grid .linka-stat-card:nth-child(2) {
    animation-delay: 0.2s;
}

.linka-stats-grid .linka-stat-card:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.linka-modal.active .linka-modal-content {
    animation: modalFadeIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    /* Bouncy pop */
}

/* Analytics Grid */
.linka-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.linka-stat-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    transition: all 0.2s ease;
}

.linka-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.linka-stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    color: #666;
    font-size: 0.9em;
}

.linka-stat-number {
    font-size: 2.2em;
    font-weight: 700;
    color: #333;
    line-height: 1;
    margin-bottom: 5px;
}

.linka-stat-trend {
    font-size: 0.8em;
    color: #4caf50;
    font-weight: 600;
}

.linka-stat-total .linka-stat-trend {
    color: #e91e63;
}

/* Chart Container */
.linka-chart-container {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.linka-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.linka-chart-header h3 {
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
}

.linka-chart-tabs {
    display: flex;
    gap: 8px;
    background: #f0f0f0;
    padding: 4px;
    border-radius: 8px;
}

.linka-chart-tab {
    border: none;
    background: none;
    padding: 4px 12px;
    font-size: 0.8em;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    color: #666;
}

.linka-chart-tab.active {
    background: #fff;
    color: #333;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.linka-chart-wrapper {
    position: relative;
    height: 250px;
    width: 100%;
}

/* Analytics Accordion */
.linka-accordion {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    transition: all 0.3s ease;
}

.linka-accordion-header {
    padding: 15px 20px;
    background: #f8f9fa;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #333;
    user-select: none;
    transition: background 0.2s;
}

.linka-accordion-header:hover {
    background: #f0f0f0;
}

.linka-accordion-chevron {
    transition: transform 0.3s ease;
    font-size: 0.8em;
    color: #666;
}

.linka-accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease;
    background: #fff;
    padding: 0 20px;
    /* Start with 0 vertical padding */
}

/* Active State */
.linka-accordion.active .linka-accordion-chevron {
    transform: rotate(180deg);
}

.linka-accordion.active .linka-accordion-body {
    max-height: 1000px;
    /* Arbitrary large height */
    padding: 20px;
    border-top: 1px solid #eee;
}

/* Override existing analytics header styles inside accordion */
.linka-accordion .linka-analytics-header {
    display: none;
    /* Hide the old inner header */
}

/* Trend Indicators */
.linka-trend-up {
    color: #4caf50;
    font-weight: 600;
    font-size: 0.9em;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.linka-trend-down {
    color: #f44336;
    font-weight: 600;
    font-size: 0.9em;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.linka-trend-neutral {
    color: #9e9e9e;
    font-weight: 600;
    font-size: 0.9em;
}

/* Custom HTML Chart Styles */
.linka-custom-card {
    background: var(--linka-theme-surface);
    border-radius: 20px;
    padding: 18px;
    width: 100%;
    border: 1px solid var(--linka-theme-border);
    box-shadow: var(--linka-shadow-sm);
}

.linka-custom-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.linka-custom-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--linka-theme-text);
}

.linka-custom-range {
    margin-bottom: 4px;
}

.linka-custom-range-value {
    font-size: 30px;
    font-weight: 700;
    color: var(--linka-theme-text);
    letter-spacing: -0.5px;
}

.linka-custom-range-unit {
    font-size: 20px;
    font-weight: 300;
    color: var(--linka-theme-text-secondary);
    margin-left: 4px;
}

.linka-custom-date-range {
    font-size: 11px;
    color: var(--linka-theme-text-secondary);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.linka-custom-chart-container {
    position: relative;
    height: 150px;
    /* Increased height for better visibility */
    margin-bottom: 20px;
}

.linka-custom-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 100%;
    position: relative;
    padding: 0 10px;
}

.linka-custom-avg-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 2px dashed rgba(0, 0, 0, 0.4);
    z-index: 1;
    animation: lineDrawIn 1s ease-out;
}

@keyframes lineDrawIn {
    from {
        width: 0;
        opacity: 0;
    }

    to {
        width: 100%;
        opacity: 1;
    }
}

.linka-custom-avg-label {
    position: absolute;
    right: 0;
    background: var(--linka-theme-text);
    color: var(--linka-theme-surface);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    z-index: 2;
}

.linka-custom-bar-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    height: 100%;
    z-index: 2;
    justify-content: flex-end;
}

/* Staggered animation delays for bars */
.linka-custom-bar-wrapper:nth-child(1) .linka-custom-bar {
    animation-delay: 0.1s;
}

.linka-custom-bar-wrapper:nth-child(2) .linka-custom-bar {
    animation-delay: 0.2s;
}

.linka-custom-bar-wrapper:nth-child(3) .linka-custom-bar {
    animation-delay: 0.3s;
}

.linka-custom-bar-wrapper:nth-child(4) .linka-custom-bar {
    animation-delay: 0.4s;
}

.linka-custom-bar-wrapper:nth-child(5) .linka-custom-bar {
    animation-delay: 0.5s;
}

.linka-custom-bar-wrapper:nth-child(6) .linka-custom-bar {
    animation-delay: 0.6s;
}

.linka-custom-bar-wrapper:nth-child(7) .linka-custom-bar {
    animation-delay: 0.7s;
}

.linka-custom-bar-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 85%;
    /* Reserve space for labels */
}

.linka-custom-bar {
    width: 12px;
    /* Monochrome Gradient: Black/Dark Grey */
    background: linear-gradient(to bottom, #000000 0%, #444444 100%);
    border-radius: 10px;
    position: relative;
    transition: all 0.3s ease;
    min-height: 4px;
    /* Ensure visible even if 0 */
    animation: barSlideUp 0.6s ease-out backwards;
}

@keyframes barSlideUp {
    from {
        transform: scaleY(0);
        transform-origin: bottom;
    }

    to {
        transform: scaleY(1);
        transform-origin: bottom;
    }
}

.linka-custom-bar:hover {
    transform: scaleX(1.1);
    background: #000;
}

.linka-custom-dot {
    width: 8px;
    height: 8px;
    background: var(--linka-theme-surface);
    border: 2px solid #000000;
    border-radius: 50%;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {

    0%,
    100% {
        transform: translateX(-50%) scale(1);
    }

    50% {
        transform: translateX(-50%) scale(1.2);
    }
}

.linka-custom-dot-top {
    top: -4px;
}

.linka-custom-dot-bottom {
    bottom: -4px;
}

.linka-custom-day-label {
    font-size: 0.875rem;
    color: var(--linka-theme-text-secondary);
    font-weight: 500;
    margin-top: 5px;
}

.linka-custom-readings {
    border-top: 1px solid var(--linka-theme-border);
    padding-top: 12px;
}

.linka-custom-reading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--linka-theme-border);
}

.linka-custom-reading:last-child {
    border-bottom: none;
}

.linka-custom-reading-time {
    font-size: 11px;
    color: var(--linka-theme-text-secondary);
}

.linka-custom-reading-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--linka-theme-text);
}

/* ========================================
   Daily Scans View Styles
   ======================================== */

.linka-daily-scans-page {
    background: var(--linka-theme-bg);
    min-height: 100vh;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.linka-daily-scans-header {
    margin-bottom: 30px;
}

.linka-daily-scans-container {
    max-width: 600px;
    margin: 0 auto;
}

.linka-daily-scans-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--linka-theme-text);
    margin-bottom: 20px;
    line-height: 1.2;
}

/* Month Navigation */
.linka-month-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: var(--linka-theme-surface);
    border: 1px solid var(--linka-theme-border);
    border-radius: 12px;
    margin-bottom: 20px;
}

.linka-month-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--linka-theme-text);
}

.linka-month-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: transparent;
    color: var(--linka-theme-text);
    transition: all 0.2s ease;
    text-decoration: none;
}

.linka-month-arrow:hover {
    background: var(--linka-theme-bg);
    transform: scale(1.1);
}

/* Day List */
.linka-day-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.linka-day-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: var(--linka-theme-surface);
    border: 1px solid var(--linka-theme-border);
    border-radius: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.linka-day-card:hover {
    border-color: var(--linka-theme-primary);
    box-shadow: var(--linka-shadow-sm);
    transform: translateX(5px);
}

.linka-day-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}

.linka-day-abbr {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--linka-theme-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.linka-day-num {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--linka-theme-text);
    line-height: 1;
}

.linka-day-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.linka-day-count {
    font-size: 1rem;
    font-weight: 600;
    color: var(--linka-theme-text);
}

.linka-day-full-date {
    font-size: 0.875rem;
    color: var(--linka-theme-text-secondary);
}

.linka-day-arrow {
    display: flex;
    align-items: center;
    color: var(--linka-theme-text-secondary);
}

.linka-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--linka-theme-text-secondary);
}

.linka-empty-state p {
    font-size: 1rem;
    margin: 0;
}

/* ========================================
   Inline Title Editor Styles
   ======================================== */

.linka-title-editable {
    position: relative;
}

.linka-modal-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0;
}

/* Modern Edit Button - From Uiverse.io by vinodjangid07 */
.editBtn {
    width: 40px;
    height: 40px;
    border-radius: 50% !important;
    border: none;
    background-color: #000000 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.123);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    opacity: 0;
}

.linka-modal-title:hover .editBtn {
    opacity: 1;
}

.editBtn::before {
    content: "";
    width: 200%;
    height: 200%;
    background-color: #1a1a1a;
    position: absolute;
    z-index: 1;
    transform: scale(0);
    transition: all 0.3s;
    border-radius: 50%;
    filter: blur(10px);
}

.editBtn:hover::before {
    transform: scale(1);
}

.editBtn:hover {
    box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.336);
}

.editBtn svg {
    height: 17px;
    fill: white;
    z-index: 3;
    transition: all 0.2s;
    transform-origin: bottom;
}

.editBtn:hover svg {
    transform: rotate(-15deg) translateX(5px);
}

.editBtn::after {
    content: "";
    width: 25px;
    height: 1.5px;
    position: absolute;
    bottom: 14px;
    left: -5px;
    background-color: white;
    border-radius: 2px;
    z-index: 2;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease-out;
}

.editBtn:hover::after {
    transform: scaleX(1);
    left: 0px;
    transform-origin: right;
}

.linka-title-edit-form {
    margin-top: 10px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.linka-title-input {
    width: 100%;
    max-width: 500px;
    padding: 10px 12px;
    font-size: 1.5rem;
    font-weight: 700;
    border: 2px solid var(--linka-theme-border);
    border-radius: 8px;
    background: var(--linka-theme-bg);
    color: var(--linka-theme-text);
    font-family: inherit;
    transition: all 0.2s ease;
}

.linka-title-input:focus {
    outline: none;
    border-color: var(--linka-theme-primary);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.linka-title-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.linka-btn-secondary {
    background: var(--linka-theme-bg-secondary);
    color: var(--linka-theme-text);
    border: 1px solid var(--linka-theme-border);
}

.linka-btn-secondary:hover {
    background: var(--linka-theme-bg-tertiary);
    border-color: var(--linka-theme-text-secondary);
}

/* ========================================
   Day Detail View Styles
   ======================================== */

.linka-day-detail-page {
    background: var(--linka-theme-bg);
    min-height: 100vh;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.linka-day-detail-container {
    max-width: 600px;
    margin: 0 auto;
}

.linka-day-detail-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--linka-theme-text);
    margin-bottom: 8px;
}

.linka-day-detail-subtitle {
    font-size: 0.875rem;
    color: var(--linka-theme-text-secondary);
    margin-bottom: 24px;
}

/* Scan Table */
.linka-scan-table {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.linka-scan-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--linka-theme-surface);
    border: 1px solid var(--linka-theme-border);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.linka-scan-row:hover {
    border-color: var(--linka-theme-primary);
    box-shadow: var(--linka-shadow-sm);
}

.linka-scan-time {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 70px;
    color: var(--linka-theme-text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.linka-scan-time svg {
    flex-shrink: 0;
}

.linka-scan-post {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    color: var(--linka-theme-text);
    font-size: 0.9375rem;
    font-weight: 500;
}

.linka-qr-icon {
    flex-shrink: 0;
    color: var(--linka-theme-text-secondary);
}

.linka-scan-country {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--linka-theme-text-secondary);
    font-size: 0.875rem;
    white-space: nowrap;
}

.linka-country-flag {
    font-size: 1.125rem;
}

.linka-scan-summary {
    text-align: center;
    padding: 20px;
    color: var(--linka-theme-text-secondary);
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 640px) {
    .linka-scan-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .linka-scan-time,
    .linka-scan-post,
    .linka-scan-country {
        width: 100%;
    }
}