/* Pixel Art Font */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

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

body {
    font-family: 'Press Start 2P', monospace;
    background: linear-gradient(135deg, #ff6600 0%, #f35e60 100%); /* Gradient from orange to red */
    color: #000;
    line-height: 1.6;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Header with Dynamite Logo */
.pixel-header {
    text-align: center;
    margin-bottom: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 4px solid #000;
    border-radius: 8px;
    position: relative;
    flex-shrink: 0;
}

.dynamite-logo {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.dynamite-image {
    width: 120px;
    height: 120px;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    filter: drop-shadow(3px 3px 0px rgba(0, 0, 0, 0.5));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

.pixel-title {
    font-size: 24px;
    margin-bottom: 10px;
    text-shadow: 3px 3px 0px #000;
    color: #fff;
}

.subtitle {
    font-size: 12px;
    color: #fff;
    text-shadow: 2px 2px 0px #000;
}

/* Status Bar */
.status-bar {
    display: flex;
    justify-content: space-around;
    background: rgba(255, 255, 255, 0.1);
    border: 3px solid #000;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
    font-size: 10px;
    margin-top: auto;
}

.status-item {
    text-align: center;
}

.status-label {
    color: #fff;
    text-shadow: 1px 1px 0px #000;
    display: block;
    margin-bottom: 5px;
}

.status-value {
    color: #ffff00;
    text-shadow: 1px 1px 0px #000;
    font-weight: bold;
}

/* Feed Container */
.feed-container {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 3px solid #000;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
    overflow-y: auto;
    max-height: 80vh;
    min-height: 70vh;
}

.notes-feed {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.loading-message {
    text-align: center;
    color: #fff;
    text-shadow: 1px 1px 0px #000;
    font-size: 14px;
}

/* Note Cards */
.note-card {
    background: rgba(255, 255, 255, 0.95);
    border: 3px solid #000;
    border-radius: 12px;
    padding: 20px;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.note-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    border-color: #cc0000;
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 11px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.note-author {
    font-weight: bold;
    color: #cc0000;
    text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.1);
    background: rgba(204, 0, 0, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.author-pic {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #000;
    object-fit: cover;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.author-name {
    font-size: 10px;
}

.note-time {
    color: #666;
    font-size: 10px;
    background: rgba(0, 0, 0, 0.05);
    padding: 3px 6px;
    border-radius: 4px;
}

.note-content {
    font-size: 12px;
    line-height: 1.5;
    color: #000;
    word-wrap: break-word;
}

/* Emoji styling */
.emoji {
    font-size: 1.2em;
    vertical-align: middle;
}

.emoji-large {
    font-size: 1.5em;
    vertical-align: middle;
}

/* Nested note styling */
.nested-note {
    background: rgba(255, 255, 0, 0.15);
    border: 2px solid rgba(255, 255, 0, 0.3);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    position: relative;
    box-shadow: 0 2px 8px rgba(255, 255, 0, 0.2);
    transition: all 0.3s ease;
}

.nested-note:hover {
    transform: translateX(2px);
    box-shadow: 0 4px 12px rgba(255, 255, 0, 0.3);
    border-color: rgba(255, 255, 0, 0.5);
    background: rgba(255, 255, 0, 0.2);
}

.nested-content {
    font-style: italic;
    color: #000;
    line-height: 1.4;
    font-weight: 500;
}

/* Quoted Container and Nested Styling */
.quoted-container {
    margin-top: 15px;
    padding-left: 25px;
    position: relative;
}

.quoted-note {
    background: rgba(255, 102, 0, 0.15);
    border: 2px solid rgba(255, 102, 0, 0.3);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    position: relative;
    box-shadow: 0 2px 8px rgba(255, 102, 0, 0.2);
    transition: all 0.3s ease;
}

.quoted-note:hover {
    transform: translateX(2px);
    box-shadow: 0 4px 12px rgba(255, 102, 0, 0.3);
    border-color: rgba(255, 102, 0, 0.5);
    background: rgba(255, 102, 0, 0.2);
}

.quoted-content {
    font-style: italic;
    color: #000;
    line-height: 1.4;
    font-weight: 500;
}

/* Nested quoted notes - Level 2 */
.quoted-note .quoted-note {
    background: rgba(255, 255, 0, 0.2);
    border-color: rgba(255, 255, 0, 0.4);
    margin-left: 20px;
    margin-top: 12px;
    box-shadow: 0 2px 8px rgba(255, 255, 0, 0.2);
}

/* Nested quoted notes - Level 3 */
.quoted-note .quoted-note .quoted-note {
    background: rgba(255, 100, 0, 0.2);
    border-color: rgba(255, 100, 0, 0.4);
    margin-left: 20px;
    margin-top: 12px;
    box-shadow: 0 2px 8px rgba(255, 100, 0, 0.2);
}

/* Nested quoted notes - Level 4 */
.quoted-note .quoted-note .quoted-note .quoted-note {
    background: rgba(200, 100, 255, 0.2);
    border-color: rgba(200, 100, 255, 0.4);
    margin-left: 20px;
    margin-top: 12px;
    box-shadow: 0 2px 8px rgba(200, 100, 255, 0.2);
}

/* Nested quoted notes - Level 5 */
.quoted-note .quoted-note .quoted-note .quoted-note .quoted-note {
    background: rgba(100, 200, 255, 0.2);
    border-color: rgba(100, 200, 255, 0.4);
    margin-left: 20px;
    margin-top: 12px;
    box-shadow: 0 2px 8px rgba(100, 200, 255, 0.2);
}

/* Nested quoted notes - Level 6+ */
.quoted-note .quoted-note .quoted-note .quoted-note .quoted-note .quoted-note {
    background: rgba(255, 102, 0, 0.25);
    border-color: rgba(255, 102, 0, 0.5);
    margin-left: 20px;
    margin-top: 12px;
    box-shadow: 0 2px 8px rgba(255, 102, 0, 0.3);
}

/* Footer */
.pixel-footer {
    text-align: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 3px solid #000;
    border-radius: 6px;
    font-size: 10px;
    color: #fff;
    text-shadow: 1px 1px 0px #000;
    margin-top: auto;
}

/* Enhanced Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
        max-width: 100%;
    }
    
    .pixel-header {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .pixel-title {
        font-size: 20px;
    }
    
    .subtitle {
        font-size: 10px;
    }
    
    .dynamite-image {
        width: 100px;
        height: 100px;
    }
    
    .feed-container {
        padding: 15px;
        max-height: 85vh;
        min-height: 75vh;
        margin-bottom: 15px;
    }
    
    .status-bar {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px;
        font-size: 9px;
        margin-top: auto;
    }
    
    .status-item {
        flex: 1;
        min-width: 80px;
    }
    
    .note-card {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .note-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .note-author {
        font-size: 9px;
        padding: 3px 6px;
    }
    
    .author-pic {
        width: 20px;
        height: 20px;
    }
    
    .author-name {
        font-size: 9px;
    }
    
    .note-time {
        font-size: 9px;
        align-self: flex-end;
    }
    
    .note-content {
        font-size: 11px;
    }
    
    .quoted-container {
        padding-left: 15px;
    }
    
    .quoted-note,
    .nested-note {
        padding: 12px;
        margin-bottom: 10px;
    }
    
    .quoted-content,
    .nested-content {
        font-size: 10px;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 10px;
    }
    
    .pixel-header {
        padding: 10px;
        margin-bottom: 10px;
    }
    
    .pixel-title {
        font-size: 16px;
    }
    
    .subtitle {
        font-size: 9px;
    }
    
    .dynamite-image {
        width: 80px;
        height: 80px;
    }
    
    .feed-container {
        padding: 12px;
        max-height: 90vh;
        min-height: 80vh;
        margin-bottom: 12px;
    }
    
    .status-bar {
        flex-direction: column;
        gap: 8px;
        padding: 10px;
        font-size: 8px;
        margin-top: auto;
    }
    
    .status-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .status-label {
        margin-bottom: 0;
    }
    
    .note-card {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .note-content {
        font-size: 10px;
    }
    
    .quoted-container {
        padding-left: 10px;
    }
    
    .quoted-note,
    .nested-note {
        padding: 10px;
        margin-bottom: 8px;
    }
    
    .quoted-content,
    .nested-content {
        font-size: 9px;
    }
    
    .pixel-footer {
        padding: 12px;
        font-size: 8px;
        margin-top: auto;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 8px;
    }
    
    .pixel-header {
        padding: 8px;
        margin-bottom: 8px;
    }
    
    .pixel-title {
        font-size: 14px;
    }
    
    .subtitle {
        font-size: 8px;
    }
    
    .dynamite-image {
        width: 60px;
        height: 60px;
    }
    
    .feed-container {
        padding: 10px;
        max-height: 95vh;
        min-height: 85vh;
        margin-bottom: 10px;
    }
    
    .status-bar {
        padding: 8px;
        font-size: 7px;
        margin-top: auto;
    }
    
    .note-card {
        padding: 10px;
        margin-bottom: 10px;
    }
    
    .note-header {
        gap: 6px;
    }
    
    .note-author {
        font-size: 8px;
        padding: 2px 4px;
    }
    
    .author-pic {
        width: 18px;
        height: 18px;
    }
    
    .author-name {
        font-size: 8px;
    }
    
    .note-time {
        font-size: 8px;
    }
    
    .note-content {
        font-size: 9px;
    }
    
    .quoted-container {
        padding-left: 8px;
    }
    
    .quoted-note,
    .nested-note {
        padding: 8px;
        margin-bottom: 6px;
    }
    
    .quoted-content,
    .nested-content {
        font-size: 8px;
    }
    
    .pixel-footer {
        padding: 10px;
        font-size: 7px;
        margin-top: auto;
    }
}

@media (max-width: 360px) {
    .pixel-title {
        font-size: 12px;
    }
    
    .subtitle {
        font-size: 7px;
    }
    
    .dynamite-image {
        width: 50px;
        height: 50px;
    }
    
    .feed-container {
        max-height: 98vh;
        min-height: 90vh;
    }
    
    .note-content {
        font-size: 8px;
    }
    
    .quoted-content,
    .nested-content {
        font-size: 7px;
    }
}

/* Touch-friendly improvements for mobile */
@media (hover: none) and (pointer: coarse) {
    .note-card:hover {
        transform: none;
    }
    
    .quoted-note:hover,
    .nested-note:hover {
        transform: none;
    }
    
    /* Increase touch targets */
    .note-card {
        min-height: 44px;
    }
    
    .status-item {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Scrollbar Styling - Enhanced Red Scrollbar */
.feed-container::-webkit-scrollbar {
    width: 16px !important;
}

.feed-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.3) !important;
    border-radius: 8px !important;
    border: 2px solid rgba(0, 0, 0, 0.2) !important;
}

.feed-container::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #ff0000 0%, #cc0000 100%) !important;
    border: 2px solid #000 !important;
    border-radius: 8px !important;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3) !important;
}

.feed-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #b20101 0%, #cc0000 100%) !important;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.2) !important;
}

.feed-container::-webkit-scrollbar-thumb:active {
    background: linear-gradient(180deg, #cc0000 0%, #990000 100%) !important;
}

/* Firefox scrollbar styling */
.feed-container {
    scrollbar-width: auto;
    scrollbar-color: #cc0000 rgba(255, 255, 255, 0.3);
}

/* Ensure scrollbar is always visible */
.feed-container {
    overflow-y: scroll !important;
}
