/* ========== REFINED OCEAN DRIFT STYLES ========== */
/* Elegant nautical design with brass accents and subtle textures */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'SF Pro Display', sans-serif;
    background: #fafbfc;
    color: #1a1a1a;
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
    touch-action: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    /* Subtle nautical texture */
    background: 
        linear-gradient(45deg, transparent 47%, rgba(0,0,0,0.01) 47%, rgba(0,0,0,0.01) 53%, transparent 53%),
        linear-gradient(-45deg, transparent 47%, rgba(0,0,0,0.01) 47%, rgba(0,0,0,0.01) 53%, transparent 53%),
        linear-gradient(180deg, #fafbfc 0%, #f8f9fa 100%);
    background-size: 60px 60px, 60px 60px, 100% 100%;
}

main.app {
    width: 100vw;
    flex: 1;
    position: relative;
    background: transparent;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    padding-top: calc(60px + env(safe-area-inset-top));
    
    /* Subtle canvas texture overlay */
    &::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: 
            radial-gradient(circle at 20% 50%, rgba(212, 175, 55, 0.02) 0%, transparent 50%),
            radial-gradient(circle at 80% 20%, rgba(184, 134, 11, 0.02) 0%, transparent 50%),
            radial-gradient(circle at 40% 80%, rgba(218, 165, 32, 0.01) 0%, transparent 50%);
        pointer-events: none;
    }
}

/* ========== ACCESSIBILITY ========== */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.skip-link,
.skip-to-categories,
.skip-to-filters {
    position: fixed;
    top: -100px;
    background: rgba(184, 134, 11, 0.95);
    backdrop-filter: blur(10px);
    color: #ffffff;
    padding: 12px 20px;
    text-decoration: none;
    z-index: 9999;
    font-weight: 500;
    font-size: 14px;
    border-radius: 0 0 12px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    opacity: 0;
    pointer-events: none;
}

.skip-to-categories {
    left: 140px;
    border-radius: 0 0 8px 8px;
}

.skip-to-filters {
    left: 300px;
    border-radius: 0 0 8px 8px;
}

.skip-link:focus,
.skip-to-categories:focus,
.skip-to-filters:focus {
    top: 0;
    outline: 3px solid #D4AF37;
    outline-offset: -3px;
    opacity: 1;
    pointer-events: auto;
}

*:focus-visible {
    outline: 2px solid #D4AF37;
    outline-offset: 2px;
}

button,
a,
select,
.action-btn,
.category-option,
.sort-option {
    min-height: 44px;
    min-width: 44px;
}

@media (prefers-contrast: high) {
    .story-card {
        border: 2px solid #B8860B;
    }
    
    .action-btn {
        border-width: 2px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .story-card {
        transition: none !important;
    }
}

.seo-content {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ========== ELEGANT NAUTICAL HEADER ========== */
.top-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: calc(60px + env(safe-area-inset-top));
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    padding-top: env(safe-area-inset-top);
    z-index: 110;
    
    /* Subtle brass accent line */
    &::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 20%;
        right: 20%;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.3), transparent);
    }
    
    /* Elegant shadow */
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05), 0 4px 20px rgba(0, 0, 0, 0.04);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-logo {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease;
    text-decoration: none;
    position: relative;
}

.app-logo:hover {
    transform: scale(1.05);
}

.app-logo:active {
    transform: scale(0.98);
}

.app-logo svg {
    width: 28px;
    height: 28px;
    display: block;
}

.app-logo:hover svg path,
.app-logo:hover svg circle {
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.5));
}

/* Subtle wave animation */
.app-logo svg path:first-of-type {
    animation: gentleWave 8s ease-in-out infinite;
}

@keyframes gentleWave {
    0%, 100% { transform: translateY(0) scaleY(1); }
    50% { transform: translateY(-1px) scaleY(1.02); }
}

.current-filters {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    min-width: 120px;
}

.filter-label {
    font-size: 10px;
    opacity: 0.5;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #B8860B;
    font-weight: 600;
}

.filter-value {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    cursor: pointer;
    padding: 6px 14px;
    border-radius: 8px;
    transition: all 0.2s;
    font-family: 'SF Pro Display', -apple-system, sans-serif;
    letter-spacing: 0.2px;
    border: 1px solid transparent;
    white-space: nowrap;
    background: rgba(0, 0, 0, 0.02);
}

.filter-value:hover {
    background: rgba(212, 175, 55, 0.08);
    border-color: rgba(212, 175, 55, 0.2);
    color: #B8860B;
    transform: translateY(-1px);
}

.filter-value.filtered {
    background: rgba(212, 175, 55, 0.12);
    border-color: rgba(212, 175, 55, 0.25);
    color: #B8860B;
}

#currentMode {
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.15);
    color: #B8860B;
}

#currentMode:hover {
    background: rgba(212, 175, 55, 0.12);
    border-color: rgba(212, 175, 55, 0.25);
    transform: translateY(-1px);
}

.story-counter {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    cursor: help;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 6px;
    transition: all 0.2s;
    border: 1px solid rgba(0, 0, 0, 0.06);
    font-family: 'SF Mono', monospace;
    letter-spacing: 0.3px;
}

.story-counter:hover {
    background: rgba(212, 175, 55, 0.08);
    border-color: rgba(212, 175, 55, 0.2);
    color: #B8860B;
    transform: translateY(-1px);
}

/* Hide time filter - always assume 7 days */
#timeFilter,
.filter-select-inline {
    display: none !important;
}

.filter-separator {
    display: none !important;
}

/* ========== ELEGANT CARD STYLES ========== */
.card-stack {
    position: absolute;
    top: calc(60px + env(safe-area-inset-top));
    left: 0;
    width: 100%;
    height: calc(100% - 60px - 40px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    perspective: 1000px;
    z-index: 1;
    overflow: hidden;
    pointer-events: auto;
}

.story-card {
    position: absolute;
    width: calc(100% - 40px);
    height: calc(100% - 120px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    max-width: 520px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    cursor: grab;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.06),
        0 2px 8px rgba(0, 0, 0, 0.04);
    z-index: 10;
    
    /* Subtle texture on cards */
    background-image: 
        radial-gradient(circle at 1px 1px, rgba(0,0,0,0.008) 1px, transparent 0);
    background-size: 20px 20px;
}

.story-card[data-high-score="true"] {
    border-color: rgba(212, 175, 55, 0.25);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.06),
        0 2px 8px rgba(0, 0, 0, 0.04),
        0 0 0 1px rgba(212, 175, 55, 0.15);
}

.story-card[data-super-score="true"] {
    border-color: rgba(184, 134, 11, 0.3);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.06),
        0 2px 8px rgba(0, 0, 0, 0.04),
        0 0 0 1px rgba(184, 134, 11, 0.2),
        0 0 20px rgba(212, 175, 55, 0.1);
}

.story-card.dragging {
    transition: none;
    cursor: grabbing;
    box-shadow: 
        0 16px 48px rgba(0, 0, 0, 0.12),
        0 4px 16px rgba(0, 0, 0, 0.08);
}

.story-card.flying-out {
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.story-card.preview {
    transform: translate(-50%, -50%) translateZ(-30px) scale(0.94);
    opacity: 0.4;
    z-index: -1;
    pointer-events: none;
    filter: blur(0.5px);
}

.card-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.card-content {
    padding: 24px 20px 140px 20px;
    height: 100%;
	max-height:80%;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

.card-category {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
    align-self: flex-start;
    transition: all 0.3s;
    border: 1px solid rgba(212, 175, 55, 0.4);
    cursor: pointer;
    white-space: nowrap;
    color: white;
    font-family: 'SF Pro Display', -apple-system, sans-serif;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    
    /* Brass detail */
    &::before {
        content: '▸ ';
        margin-right: 2px;
        opacity: 0.8;
        font-size: 9px;
        color: #B8860B;
    }
}

.card-category:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 1);
    border-color: rgba(212, 175, 55, 0.6);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
}

.card-title {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 16px;
    color: #1a1a1a;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    letter-spacing: -0.01em;
}

.card-thumbnail {
    width: 100%;
    height: 140px;
    margin-bottom: 16px;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.06);
    
    /* Subtle brass border on hover */
    transition: border-color 0.3s ease;
}

.card-thumbnail:hover {
    border-color: rgba(212, 175, 55, 0.2);
}
.time-span{
color:black !important;
}
.card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 13px;
    opacity: 0.6;
    flex-wrap: wrap;
    color: #666;
    font-weight: 500;
}

.card-meta > . span {
color:black !important;
}
.card-meta .time-display {
    font-weight: 600;
    color: #1a1a1a;
    opacity: 1;
}

.card-summary-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
    min-height: 0;
}

.card-summary {
    height: 100%;
    overflow-y: auto;
    font-size: 15px;
    line-height: 1.6;
    -webkit-overflow-scrolling: touch;
    padding-right: 12px;
    padding-bottom: 12px;
    color: #333;
    font-weight: 400;
}

.card-summary::-webkit-scrollbar {
    width: 3px;
}

.card-summary::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.04);
    border-radius: 2px;
}

.card-summary::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.4);
    border-radius: 2px;
}

.card-summary::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.6);
}

/* ========== NAUTICAL SENTIMENT ANALYTICS ========== */
.sentiment-meters {
    position: absolute;
    bottom: 160px;
    left: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.98);
    padding: 16px 16px 12px 16px;
    border-radius: 10px;
    backdrop-filter: blur(16px) saturate(140%);
    z-index: 5;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    
    /* Nautical brass accent lines */
    &::before {
        content: '';
        position: absolute;
        top: 0;
        left: 16px;
        right: 16px;
        height: 2px;
        background: linear-gradient(90deg, 
            rgba(212, 175, 55, 0.6) 0%, 
            rgba(184, 134, 11, 0.6) 50%,
            rgba(212, 175, 55, 0.6) 100%);
        border-radius: 1px;
    }
    
    &::after {
        content: 'MARINE ANALYTICS';
        position: absolute;
        top: -10px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 9px;
        font-weight: 700;
        color: #B8860B;
        background: #ffffff;
        padding: 3px 12px;
        letter-spacing: 1.5px;
        font-family: 'SF Mono', monospace;
        border-radius: 4px;
        border: 1px solid rgba(212, 175, 55, 0.2);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
}

.sentiment-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-top: 4px;
}

.sentiment-item {
    text-align: center;
    padding: 4px 2px;
}

.sentiment-value {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 2px;
    transition: all 0.3s ease;
    font-family: 'SF Mono', monospace;
    letter-spacing: 0.3px;
    color: #1a1a1a;
}

/* Sentiment color styling */
.sentiment-item:nth-child(1) .sentiment-value { color: #B8860B; } /* Health - Brass */
.sentiment-item:nth-child(2) .sentiment-value { color: #CD853F; } /* Thermal - Peru */
.sentiment-item:nth-child(3) .sentiment-value { color: #D2691E; } /* Turbulence - Chocolate */
.sentiment-item:nth-child(4) .sentiment-value { color: #A0522D; } /* Stress - Sienna */
.sentiment-item:nth-child(5) .sentiment-value { color: #DAA520; } /* Ecosystem - Goldenrod */
.sentiment-item:nth-child(6) .sentiment-value { color: #B8860B; } /* Certainty - Brass */

.sentiment-label {
    font-size: 8px;
    text-transform: uppercase;
    opacity: 0.6;
    letter-spacing: 1px;
    color: #666;
    font-family: 'SF Pro Display', -apple-system, sans-serif;
    font-weight: 600;
}

/* ========== ELEGANT NAUTICAL CONTROLS ========== */
.card-actions {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-around;
    gap: 6px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.98);
    padding: 16px 12px;
    border-radius: 12px;
    backdrop-filter: blur(16px) saturate(140%);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    
    /* Brass accent line */
    &::before {
        content: '';
        position: absolute;
        top: 0;
        left: 20%;
        right: 20%;
        height: 2px;
        background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.4), transparent);
        border-radius: 1px;
    }
}

.action-btn {
    flex: 1;
    padding: 12px 6px;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 10px;
    color: #666;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    font-family: 'SF Pro Display', -apple-system, sans-serif;
    letter-spacing: 0.3px;
    min-height: 44px;
    justify-content: center;
}

.action-btn svg {
    width: 18px;
    height: 18px;
    stroke-width: 1.8;
    opacity: 0.8;
    transition: all 0.2s;
}

.action-btn:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.2);
    color: #B8860B;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.15);
}

.action-btn:hover svg {
    opacity: 1;
    stroke: #B8860B;
    transform: scale(1.05);
}

.action-btn:active {
    transform: scale(0.98);
}

.action-btn.upvote:active {
    background: rgba(76, 175, 80, 0.12);
    border-color: rgba(76, 175, 80, 0.2);
    color: #2e7d32;
}

.action-btn.upvote.voted {
    background: rgba(76, 175, 80, 0.1);
    border-color: rgba(76, 175, 80, 0.2);
    color: #2e7d32;
}

.action-btn.downvote:active {
    background: rgba(244, 67, 54, 0.12);
    border-color: rgba(244, 67, 54, 0.2);
    color: #c62828;
}

.action-btn.downvote.voted {
    background: rgba(244, 67, 54, 0.1);
    border-color: rgba(244, 67, 54, 0.2);
    color: #c62828;
}

.action-btn span {
    font-size: 9px;
    opacity: 0.9;
    font-weight: 600;
}

/* ========== NAVIGATION HINTS ========== */
.nav-hints {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.nav-hint {
    position: absolute;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0;
    animation: hintPulse 4s infinite;
    border: 1px solid rgba(212, 175, 55, 0.25);
    color: #B8860B;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-hint.top {
    top: calc(env(safe-area-inset-top) + 15px);
    left: 50%;
    transform: translateX(-50%);
}

.nav-hint.bottom {
    bottom: calc(env(safe-area-inset-bottom) + 60px);
    left: 50%;
    transform: translateX(-50%);
}

.nav-hint.left {
    left: 50%;
    top: calc(env(safe-area-inset-top) + 15px);
    transform: translateX(-100px);
}

.nav-hint.right {
    right: 50%;
    top: calc(env(safe-area-inset-top) + 15px);
    transform: translateX(100px);
}

/* ========== MODALS ========== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(248, 249, 250, 0.98);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    backdrop-filter: blur(20px);
}

.modal.show {
    display: flex;
}

.modal-content {
    background: #ffffff;
    border-radius: 20px;
    padding: 32px;
    max-width: 800px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid rgba(0, 0, 0, 0.08);
    position: relative;
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.1);
    
    /* Subtle texture */
    background-image: 
        radial-gradient(circle at 1px 1px, rgba(0,0,0,0.006) 1px, transparent 0);
    background-size: 16px 16px;
}

.modal-content::-webkit-scrollbar {
    width: 4px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.04);
    border-radius: 2px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.4);
    border-radius: 2px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    position: relative;
}

.modal-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 30%;
    right: 30%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.4), transparent);
}

.modal-header div {
    font-size: 24px;
    color: #1a1a1a;
    font-weight: 600;
}

.close-btn {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.25);
    color: #B8860B;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.2s;
    letter-spacing: 0.5px;
}

.close-btn:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.4);
    transform: translateY(-1px);
}

.modal-body {
    color: #333;
    line-height: 1.6;
    font-size: 15px;
}

/* Info Modal Styles */
.info-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(248, 249, 250, 0.98);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    backdrop-filter: blur(20px);
}

.info-modal.show {
    display: flex;
}

.info-content {
    background: #ffffff;
    border-radius: 20px;
    padding: 40px;
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid rgba(0, 0, 0, 0.08);
    position: relative;
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.1);
    
    /* Subtle canvas texture */
    background-image: 
        radial-gradient(circle at 1px 1px, rgba(0,0,0,0.006) 1px, transparent 0);
    background-size: 16px 16px;
}

.info-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    padding: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.info-close:hover {
    background: rgba(244, 67, 54, 0.08);
    border-color: rgba(244, 67, 54, 0.2);
    color: #c62828;
    transform: rotate(90deg);
}

.info-content h2 {
    color: #1a1a1a;
    margin-bottom: 32px;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.info-section {
    margin-bottom: 32px;
}

.info-section h3 {
    color: #B8860B;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.info-gesture {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 16px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.2s;
}

.info-gesture:hover {
    background: rgba(212, 175, 55, 0.06);
    border-color: rgba(212, 175, 55, 0.15);
    transform: translateX(4px);
}

.info-gesture-icon {
    color: #B8860B;
    font-weight: 700;
    min-width: 60px;
    font-size: 14px;
    text-align: center;
    background: rgba(212, 175, 55, 0.1);
    padding: 8px;
    border-radius: 8px;
    font-family: 'SF Mono', monospace;
}

.info-gesture-text {
    flex: 1;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.info-indicator {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 16px;
    margin-bottom: 12px;
    align-items: center;
    padding: 12px;
    background: rgba(0, 0, 0, 0.01);
    border-radius: 8px;
    transition: all 0.2s;
}

.info-indicator:hover {
    background: rgba(212, 175, 55, 0.06);
}

.info-indicator-label {
    color: #B8860B;
    font-size: 13px;
    font-weight: 700;
}

.info-indicator-desc {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.info-sort-current {
    padding: 20px;
    background: rgba(212, 175, 55, 0.08);
    border-radius: 12px;
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    color: #B8860B;
    font-weight: 600;
}

/* Tutorial Styles */
.tutorial {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(248, 249, 250, 0.98);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 40px;
    backdrop-filter: blur(20px);
}

.tutorial-content {
    text-align: center;
    max-width: 440px;
    width: 100%;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    padding: 48px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.1);
    
    /* Canvas texture */
    background-image: 
        radial-gradient(circle at 1px 1px, rgba(0,0,0,0.006) 1px, transparent 0);
    background-size: 16px 16px;
}

.tutorial-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 2px;
    background: linear-gradient(90deg, 
        rgba(212, 175, 55, 0.5) 0%, 
        rgba(184, 134, 11, 0.5) 50%,
        rgba(212, 175, 55, 0.5) 100%);
}

.tutorial-logo {
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
    animation: tutorialLogoFloat 6s ease-in-out infinite;
}

@keyframes tutorialLogoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.tutorial-logo svg {
    margin: 0 auto;
    display: block;
}

.tutorial h2 {
    font-size: 32px;
    margin-bottom: 16px;
    color: #1a1a1a;
    font-weight: 700;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
}

.tutorial-subtitle {
    margin-bottom: 40px;
    opacity: 0.6;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.3px;
    position: relative;
    z-index: 1;
    color: #666;
}

.tutorial-item {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 28px;
    text-align: left;
    position: relative;
    z-index: 1;
}

.tutorial-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.tutorial-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(212, 175, 55, 0.15);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.5s ease;
}

.tutorial-item:hover .tutorial-icon {
    background: rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.35);
    transform: translateY(-2px);
}

.tutorial-item:hover .tutorial-icon::before {
    width: 100%;
    height: 100%;
}

.tutorial-icon svg {
    width: 24px;
    height: 24px;
    stroke: #B8860B;
    stroke-width: 2;
    fill: none;
    position: relative;
    z-index: 1;
}

.tutorial-text {
    flex: 1;
    font-size: 15px;
    line-height: 1.5;
    color: #333;
    font-weight: 500;
}

.tutorial-btn {
    background: rgba(212, 175, 55, 0.12);
    color: #B8860B;
    border: 1px solid rgba(212, 175, 55, 0.25);
    padding: 18px 48px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 30px;
    margin-top: 32px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    overflow: hidden;
    min-height: 56px;
    min-width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}

.tutorial-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(212, 175, 55, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.5s ease;
    z-index: -1;
}

.tutorial-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.3);
    background: rgba(212, 175, 55, 0.18);
    border-color: rgba(212, 175, 55, 0.4);
}

.tutorial-btn:hover::before {
    width: 300px;
    height: 300px;
}

.tutorial-btn:active {
    transform: translateY(0);
}

/* Category Selector */
.category-selector {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(248, 249, 250, 0.98);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 40px;
    backdrop-filter: blur(20px);
}

.category-selector.show {
    display: flex;
}

.category-list {
    background: #ffffff;
    border-radius: 20px;
    padding: 32px;
    max-width: 480px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid rgba(0, 0, 0, 0.08);
    position: relative;
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.1);
    
    /* Canvas texture */
    background-image: 
        radial-gradient(circle at 1px 1px, rgba(0,0,0,0.006) 1px, transparent 0);
    background-size: 16px 16px;
}

.category-list h3 {
    color: #1a1a1a;
    margin-bottom: 24px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.category-list h4 {
    color: #B8860B;
    margin: 24px 0 16px 0;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.category-option {
    padding: 16px 20px;
    margin: 8px 0;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 15px;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
    color: #333;
}

.category-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.06), transparent);
    transition: left 0.5s ease;
}

.category-option:hover {
    background: rgba(212, 175, 55, 0.1);
    transform: translateX(4px);
    border-color: rgba(212, 175, 55, 0.2);
    color: #1a1a1a;
}

.category-option:hover::before {
    left: 100%;
}

.category-option.active {
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.25);
    color: #B8860B;
}

.category-count {
    font-size: 13px;
    opacity: 0.6;
    background: rgba(0, 0, 0, 0.04);
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
}

.sort-option {
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sort-option:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.2);
    color: #B8860B;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.15);
}

.sort-option.active {
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.25);
    color: #B8860B;
}

/* ========== FEEDBACK & OVERLAYS ========== */
.swipe-feedback {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    font-weight: 700;
    opacity: 0;
    pointer-events: none;
    z-index: 50;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid rgba(212, 175, 55, 0.25);
    color: #B8860B;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.swipe-feedback.show {
    animation: feedbackPop 0.6s ease;
}

.swipe-feedback.skip {
    font-size: 16px;
    background: rgba(255, 255, 255, 0.95);
    color: #666;
}

/* ========== PERSONAL STATS STYLES ========== */
.stats-icon-btn {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.06);
    color: #666;
    cursor: pointer;
    padding: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
}

.stats-icon-btn:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.2);
    color: #B8860B;
    transform: translateY(-1px);
}

.stats-icon-btn.stats-pulse::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: #B8860B;
    border-radius: 50%;
    top: 8px;
    right: 8px;
    animation: statsPulse 2s infinite;
}

.personal-stats-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(248, 249, 250, 0.98);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    backdrop-filter: blur(20px);
}

.personal-stats-modal.show {
    display: flex;
}

.stats-container {
    background: #ffffff;
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid rgba(0, 0, 0, 0.08);
    position: relative;
    animation: statsSlideUp 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.1);
    
    /* Canvas texture */
    background-image: 
        radial-gradient(circle at 1px 1px, rgba(0,0,0,0.006) 1px, transparent 0);
    background-size: 16px 16px;
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    position: relative;
}

.stats-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 30%;
    right: 30%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.4), transparent);
}

.stats-close {
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    padding: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.stats-close:hover {
    background: rgba(244, 67, 54, 0.08);
    border-color: rgba(244, 67, 54, 0.2);
    color: #c62828;
    transform: rotate(90deg);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.2s;
}

.stat-card:hover {
    background: rgba(212, 175, 55, 0.06);
    border-color: rgba(212, 175, 55, 0.15);
    transform: translateY(-2px);
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #B8860B;
    margin-bottom: 8px;
    font-family: 'SF Mono', monospace;
    letter-spacing: -0.5px;
}

.stat-label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    color: #B8860B;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(212, 175, 55, 0.2);
    padding-bottom: 8px;
}

/* Mood meter */
.mood-meter {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 3px;
    margin-top: 8px;
    overflow: hidden;
}

.mood-meter-fill {
    height: 100%;
    background: linear-gradient(90deg, #B8860B, #D4AF37);
    border-radius: 3px;
    transition: width 0.3s ease;
    position: relative;
}

.mood-meter-marker {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 10px;
    background: #B8860B;
    border-radius: 1px;
}

/* Category chart bars */
.category-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
    border-left: 3px solid #B8860B;
}

.category-bar-label {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    flex: 1;
}

.category-bar-count {
    font-size: 12px;
    color: #666;
    margin-left: 8px;
    font-weight: 500;
}

.category-bar-track {
    flex: 2;
    height: 8px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 4px;
    margin: 0 12px;
    overflow: hidden;
}

.category-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #B8860B, #D4AF37);
    border-radius: 4px;
    transition: width 0.3s ease;
    min-width: 2px;
}

.category-bar:hover {
    background: rgba(212, 175, 55, 0.06);
    transform: translateX(2px);
}

.category-bar:hover .category-bar-fill {
    background: linear-gradient(90deg, #D4AF37, #B8860B);
}

/* Stats buttons */
.stats-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    margin: 0 8px;
}

.stats-btn-primary {
    background: rgba(212, 175, 55, 0.12);
    color: #B8860B;
    border: 1px solid rgba(212, 175, 55, 0.25);
}

.stats-btn-primary:hover {
    background: rgba(212, 175, 55, 0.18);
    border-color: rgba(212, 175, 55, 0.4);
    transform: translateY(-1px);
}

.stats-btn-secondary {
    background: rgba(0, 0, 0, 0.04);
    color: #666;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.stats-btn-secondary:hover {
    background: rgba(244, 67, 54, 0.08);
    color: #c62828;
    border-color: rgba(244, 67, 54, 0.2);
}

/* Footer */
.footer-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding: 8px 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    z-index: 100;
    
    /* Subtle brass accent */
    &::before {
        content: '';
        position: absolute;
        top: 0;
        left: 25%;
        right: 25%;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.2), transparent);
    }
}

.footer-link {
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
}

.footer-link:hover {
    color: #B8860B;
}

.footer-separator {
    color: rgba(0, 0, 0, 0.2);
}

/* Ocean watermark */
.drift-watermark {
    position: fixed;
    bottom: 50px;
    right: 20px;
    font-size: 10px;
    opacity: 0.2;
    color: #666;
    font-weight: 600;
    letter-spacing: 2px;
    z-index: 2;
    pointer-events: none;
}

/* ========== ANIMATIONS ========== */
@keyframes hintPulse {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.6; }
}

@keyframes feedbackPop {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.05);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

@keyframes statsPulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes statsSlideUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Loading indicator */
.loading-text {
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: pulse 2s infinite;
    color: #666;
    font-weight: 600;
}

.loading-text::after {
    content: 'loading ocean stories...';
}

/* Mobile optimizations */
@media (max-width: 768px) {
    body { 
        padding: 0; 
        font-size: 14px; 
    }
    
    .top-header {
        padding: 0 16px;
        padding-top: env(safe-area-inset-top);
    }
    
    .card-category {
        font-size: 10px;
        padding: 5px 10px;
    }
    
    .card-title {
        font-size: 20px;
    }
    
    .card-content {
        padding: 20px 16px 120px 16px;
    }
    
    .sentiment-meters {
        left: 16px;
        right: 16px;
        bottom: 70px;
        padding: 14px 12px 10px 12px;
    }
    
    .sentiment-grid {
        gap: 8px;
    }
    
    .sentiment-value {
        font-size: 14px;
    }
    
    .sentiment-label {
        font-size: 7px;
    }
    
    .card-actions {
        left: 16px;
        right: 16px;
        bottom: 16px;
        padding: 14px 10px;
    }
    
    .action-btn {
        padding: 10px 4px;
        min-height: 48px;
    }
    
    .action-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .action-btn span {
        font-size: 8px;
    }
    
    .tutorial-btn {
        padding: 20px 40px;
        font-size: 15px;
        min-height: 60px;
        margin-top: 24px;
        width: 100%;
        max-width: 280px;
    }
    
    .tutorial-content {
        padding: 32px 24px;
        margin: 0 16px;
    }
    
    .tutorial {
        padding: 24px 16px;
    }
}