/* Font Imports */
@font-face {
    font-family: 'Bitcount';
    src: url('./fonts/BitcountPropSingle-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Bitcount';
    src: url('./fonts/BitcountPropSingle-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'Bitcount';
    src: url('./fonts/BitcountPropSingle-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: #fafafa;
    background-image: radial-gradient(circle, #e0e0e0 1px, transparent 1px);
    background-size: 20px 20px;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Disable background scroll when modal is open */
body.modal-open {
    overflow: hidden;
}

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

/* Header */
.header {
    padding: 30px 0 60px 0;
    text-align: left;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo {
    font-family: 'Bitcount', monospace;
    font-size: 3.5rem;
    font-weight: normal;
    color: #000;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    line-height: 1;
}

.logo.error-state {
    color: #c62828;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.limit-notice {
    font-family: 'Bitcount', monospace;
    font-size: 1rem;
    color: #e53e3e;
}

/* AI status dot next to Create smart folder and user icon */
.ai-status {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #bbb; /* default/unknown */
    box-shadow: 0 0 0 2px rgba(0,0,0,0.05);
    flex-shrink: 0;
}

.ai-status.ok { background: #16a34a; }
.ai-status.down { background: #e53e3e; }

.user-container {
    position: relative;
}

/* User Button */
.user-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #d0d4d9;
    background: #4a4a4a;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    touch-action: manipulation;
}

.user-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: #a0a5ac;
}

.user-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.user-initial {
    font-family: 'Bitcount', monospace;
    font-size: 18px;
    letter-spacing: 2px;
    font-weight: normal;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    line-height: 1;
    text-align: center;
}

/* User Dropdown */
.user-dropdown {
    position: absolute;
    top: 50px;
    right: -10px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    min-width: 150px;
    max-width: 85vw;
    z-index: 1000;
    border: 1px solid #e0e0e0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-info {
    padding: 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
}

.user-email {
    font-size: 12px;
    color: #6c757d;
}

.dropdown-divider {
    margin: 0;
    border: none;
    border-top: 1px solid #e9ecef;
}

.dropdown-item {
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: white;
    color: #333;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-family: 'Bitcount', monospace;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background: #f8f9fa;
    color: #ff8c42;
}

/* Smart Stacks Button */
.stacks-btn {
    background: transparent;
    border: 1.5px solid #d0d4d9;
    color: #6c757d;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: normal;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    font-family: 'Bitcount', monospace;
    text-decoration: none;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    touch-action: manipulation;
}

.stacks-btn:hover {
    color: #343a40;
    border-color: #b5bcc3;
    transform: translateY(-1px);
}

.stacks-btn:active { transform: translateY(0); }

/* Main Content */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
    width: 100%;
}

.main.shifted {
    margin-right: 0;
}

/* Input Section */
.input-section {
    width: 100%;
    max-width: 100%;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 48px;
    z-index: 2000;
    background: transparent;
    backdrop-filter: none;
    padding: 0 20px;
    display: flex;
    justify-content: center;
}

.input-container {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    max-width: 900px;
    width: 100%;
    position: relative;
    z-index: 2001;
}

.input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.url-input {
    flex: 1;
    padding: 14px 16px;
    font-size: 1rem;
    font-family: 'Bitcount', monospace;
    border: 2px solid #e0e0e0;
    border-radius: 999px;
    background: #fff;
    transition: all 0.3s ease;
    outline: none;
    min-height: 44px;
    width: 100%;
}

.url-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.url-input::placeholder {
    color: #999;
    font-family: inherit;
}

/* Input Progress Bar - Above Input Field Only */
.input-progress-bar {
    width: 100%;
    height: 4px;
    background-color: rgba(224, 224, 224, 0.3);
    border-radius: 2px;
    overflow: hidden;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
    margin-bottom: 4px;
}

.input-progress-bar.show {
    opacity: 1;
    transform: translateY(0);
}

.input-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #0056b3);
    width: 0%;
    border-radius: 2px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 12px rgba(0, 123, 255, 0.5);
}

/* New circular Go button */
.go-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: #000;
    color: #fff;
    font-size: 22px;
    font-family: 'Bitcount', monospace;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.2s ease, background 0.2s ease;
    flex-shrink: 0;
    touch-action: manipulation;
    min-width: 44px;
    min-height: 44px;
}

.go-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.go-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    background: #111;
}

.btn {
    padding: 12px 32px;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
    min-height: 44px;
    touch-action: manipulation;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: #0056b3;
    transform: translateY(-1px);
}

.btn-primary:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
    transform: translateY(-1px);
}

/* Loading */
.loading {
    text-align: center;
    padding: 8px 20px 0 20px;
    color: #666;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.progress-container {
    width: 100%;
}

.progress-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    position: relative;
    margin-left: 16px;
    --label-space: 160px;
    padding-right: var(--label-space);
}

.progress-bar {
    display: none;
    width: calc(100% - var(--label-space));
    flex: 0 0 calc(100% - var(--label-space));
    height: 12px;
    background-color: #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 6px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #0056b3);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-label {
    min-width: 120px;
    text-align: left;
    font-size: 0.85rem;
    color: #444;
    font-family: 'Bitcount', monospace;
    flex: 0 0 auto;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.progress-steps { display: none; }

.progress-steps::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 20px;
    right: 20px;
    height: 2px;
    background: #e0e0e0;
    z-index: 1;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    flex: 1;
}

.step-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
    margin-bottom: 8px;
}

.step-text {
    font-size: 0.85rem;
    color: #666;
    text-align: center;
    line-height: 1.2;
    transition: color 0.3s ease;
}

.step.active .step-icon {
    background: #007bff;
    border-color: #007bff;
    color: white;
    transform: scale(1.1);
}

.step.active .step-text {
    color: #007bff;
    font-weight: 500;
}

.step.completed .step-icon {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

.step.completed .step-text {
    color: #28a745;
    font-weight: 500;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Eye Loader from Uiverse.io - Rotating animation removed */
.loader {
    display: inline-flex;
    gap: 10px;
}

.loader:before,
.loader:after {
    content: "";
    height: 20px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(farthest-side,#000 95%,#0000) 35% 35%/6px 6px no-repeat
        #fff;
    transform: scaleX(var(--s,1));
}

.loader:after {
    --s: -1;
}

/* Messages */
.error {
    padding: 16px 20px;
    border-radius: 6px;
    margin: 20px 0 60px 0;
    max-width: 600px;
    text-align: center;
    background-color: transparent;
    color: #c62828;
    border: 1px solid #f5c6cb;
    font-family: 'Bitcount', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Reels Grid */
.reels-section {
    width: 100%;
    max-width: 1200px;
}

/* Category Stacks */
.category-stacks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    position: relative;
    width: 100%;
}

/* Divider line */
.category-divider {
    width: 100%;
    height: 2px;
    background: #ccc;
    margin: 20px 0;
}

.category-folder {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: transparent;
    border: none;
    order: 0;
    touch-action: manipulation;
}

.category-folder:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.category-folder:active {
    transform: translateY(0);
}

.category-folder.expanded {
    background: #fff;
    grid-column: 1 / -1;
    border: 1px solid #e0e0e0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    padding: 16px;
    align-items: center;
    display: flex;
    flex-direction: row;
    gap: 20px;
    position: relative;
    order: 999;
}

.category-folder.expanded .folder-image {
    display: none;
}

.category-folder.expanded .category-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 0, 0, 0.2);
    font-size: 1.5rem;
    color: #fff;
    cursor: pointer;
    z-index: 10;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    touch-action: manipulation;
    min-height: 44px;
    min-width: 44px;
}

.category-folder.expanded .category-close-btn:hover {
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    transform: scale(1.1);
    border-color: rgba(0, 0, 0, 0.3);
}

/* Dark mode variant for dark backgrounds */
.category-folder.expanded .category-close-btn.dark-mode {
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #000;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.category-folder.expanded .category-close-btn.dark-mode:hover {
    background: rgba(255, 255, 255, 0.5);
    color: #000;
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.6);
}

/* Reel card close button */
.reel-card {
    position: relative;
}

.reel-card .reel-close-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 0, 0, 0.3);
    font-size: 1.2rem;
    color: #fff;
    cursor: pointer;
    z-index: 10;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.2s ease;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    touch-action: manipulation;
    min-height: 44px;
    min-width: 44px;
}

@media (max-width: 768px) {
    .reel-card .reel-close-btn {
        top: 6px;
        right: 6px;
        width: 20px;
        height: 20px;
        font-size: 1rem;
        padding: 2px;
    }
}

@media (max-width: 480px) {
    .reel-card .reel-close-btn {
        top: 4px;
        right: 4px;
        width: 18px;
        height: 18px;
        font-size: 0.9rem;
        padding: 1px;
    }
}

.reel-card .reel-close-btn svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

.reel-card:hover .reel-close-btn {
    opacity: 1;
}

.reel-card:active .reel-close-btn {
    opacity: 1;
}

.reel-card .reel-close-btn:hover {
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    transform: scale(1.1);
    border-color: rgba(0, 0, 0, 0.4);
}

/* Dark mode variant for reel cards */
.reel-card .reel-close-btn.dark-mode {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #000;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.reel-card .reel-close-btn.dark-mode:hover {
    background: rgba(255, 255, 255, 0.6);
    color: #000;
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.7);
}

.category-edit-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 2px 4px;
    margin-top: 4px;
    font-style: italic;
    transition: color 0.2s ease;
    touch-action: manipulation;
}

.category-edit-btn:hover {
    color: #666;
}

.category-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.category-title.edit-mode {
    background: #f8f8f8;
    border: 1px solid #ccc;
    padding: 8px 12px;
    border-radius: 4px;
    font-style: italic;
    color: #666;
}

.category-folder.expanded .category-title {
    font-size: 1.9rem;
    font-weight: normal;
    text-align: left;
    margin: 0;
    flex-shrink: 0;
    min-width: 120px;
    display: flex;
    align-items: center;
    align-self: center;
    height: 100%;
    margin-top: 0;
}

.folder-image {
    width: 110px;
    height: 110px;
    object-fit: contain;
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}

.category-folder:hover .folder-image {
    transform: scale(1.05);
}

.category-title {
    font-family: 'Bitcount', monospace;
    font-size: 0.9rem;
    font-weight: normal;
    color: #333;
    text-align: center;
    line-height: 1.2;
    margin-bottom: 5px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Small inline edit button next to title */
.category-inline-edit-btn {
    background: transparent;
    border: none;
    color: #888;
    font-size: 0.72rem;
    line-height: 1;
    padding: 0;
    margin: 0;
    align-self: flex-start;
    cursor: pointer;
    touch-action: manipulation;
}
.category-inline-edit-btn:hover { color: #666; text-decoration: underline; }

.category-count {
    display: none;
}

.category-reels {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 16px;
    width: 100%;
}

.category-folder.expanded .category-reels {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin: 0;
    flex: 1;
}

.category-reels.show {
    display: grid;
}

/* When one folder is expanded, dim and shift the rest */
.category-stacks.one-expanded .category-folder:not(.expanded) {
    opacity: 0.5;
    transform: translateY(6px);
    filter: blur(0.2px);
}

/* Editable title styling */
.category-title[contenteditable="true"] {
    outline: 2px dashed #bcd;
    outline-offset: 2px;
    background: #f7fbff;
    padding: 4px 6px;
    border-radius: 6px;
}

.category-title.edit-hint::after {
    content: ' — edit title';
    font-size: 0.8em;
    color: #888;
    font-style: italic;
}

/* Reels Grid */
.reels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 12px 0;
    position: relative;
    width: 100%;
}

/* 3 columns on tablets and larger phones */
@media (max-width: 1200px) and (min-width: 769px) {
    .reels-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
    }
}

/* 3 columns on mobile */
@media (max-width: 768px) {
    .reels-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
}

/* 2 columns on small mobile */
@media (max-width: 480px) {
    .reels-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}

/* 1 column on extra small */
@media (max-width: 360px) {
    .reels-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }
}

/* Empty state */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 0;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 600px;
    padding: 20px;
}

.empty-title {
    font-size: 2.2rem;
    color: #111;
    margin-bottom: 24px;
}

.empty-subtitle {
    font-size: 1rem;
    color: #666;
}

/* Inline error under empty-state subtitle */
.empty-error {
    margin-top: 12px;
    color: #c62828;
    font-size: 0.95rem;
}

/* Emoji decorations */
.emoji-decor {
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 700px;
    pointer-events: none;
}

.emoji-decor .emoji {
    position: absolute;
    font-size: 2.2rem;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.08));
}

.emoji-decor .emoji.web { opacity: 0.9; }
.emoji-decor .emoji.web1 { left: 8%; top: -18px; }
.emoji-decor .emoji.web2 { left: 22%; top: -8px; transform: rotate(-8deg); }
.emoji-decor .emoji.web3 { left: 38%; top: -28px; transform: scale(0.9) rotate(6deg); }
.emoji-decor .emoji.web4 { right: 36%; top: -14px; transform: rotate(-4deg); }
.emoji-decor .emoji.web5 { right: 20%; top: -26px; transform: scale(1.1); }
.emoji-decor .emoji.web6 { right: 6%; top: -6px; }
.emoji-decor .emoji.ghost { right: 12%; top: -30px; }

.reel-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    .reel-card {
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }
}

@media (max-width: 480px) {
    .reel-card {
        border-radius: 6px;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    }
}

.reel-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.reel-card:active {
    transform: translateY(0);
}

/* Pinned reel styling */
.reel-card.pinned {
    border: 3px dashed #c0c0c0;
    background: linear-gradient(135deg, #fff 0%, #f8f8f8 100%);
}

.reel-card.pinned:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(192, 192, 192, 0.3);
}

/* Pin indicator */
.pin-indicator {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(192, 192, 192, 0.9);
    color: #666;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 10;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pin-indicator svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

.reel-thumbnail {
    width: 100%;
    aspect-ratio: 9 / 15;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    max-height: 500px;
}

.reel-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.reel-card:hover .reel-cover {
    transform: scale(1.05);
}

.reel-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #9e9e9e 0%, #757575 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.play-icon {
    font-size: 3rem;
    color: white;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.video-info {
    color: white;
    font-size: 0.85rem;
    font-weight: normal;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    font-family: 'Bitcount', monospace;
    padding: 8px 10px;
    text-align: center;
}

.reel-content {
    padding: 12px;
}

@media (max-width: 768px) {
    .reel-content {
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .reel-content {
        padding: 6px;
    }
}

/* Hide metadata section so only the screenshot is shown in grid */
.reel-card .reel-content { display: none; }

.reel-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
    line-height: 1.3;
}

.reel-info {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.reel-category {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.reel-creator {
    font-size: 0.85rem;
    color: #888;
    font-style: italic;
}

.reel-meta {
    font-size: 0.8rem;
    color: #999;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eee;
}

.reel-id {
    font-weight: 500;
    color: #777;
}

.reel-date {
    color: #aaa;
}

/* Analysis Panel */
.analysis-panel { display: none; }

.analysis-panel.show {
    transform: translateX(0);
}

.analysis-content { display: none; }

.close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #f5f5f5;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    color: #666;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    min-height: 44px;
    min-width: 44px;
}

.close-btn:hover {
    background: #e0e0e0;
    color: #333;
}

.analysis-title {
    font-family: 'Bitcount', monospace;
    font-size: 1.3rem;
    font-weight: normal;
    margin-bottom: 20px;
    color: #333;
    line-height: 1.3;
}

.analysis-text {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #555;
    white-space: pre-wrap;
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Overlay and Focused Reel */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.25);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 3000;
}

/* Recent Deleted Modal */
.recent-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.98);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.2);
    z-index: 3002;
    width: min(860px, 94vw);
    max-height: 86vh;
    display: flex;
    flex-direction: column;
    padding: 20px;
    border: 1px solid #e5e7eb;
}

.recent-modal .recent-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.recent-modal .recent-title {
    font-family: 'Bitcount', monospace;
    font-size: 1.2rem;
    color: #111;
}

.recent-modal .recent-close {
    background: #f5f5f5;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    min-height: 44px;
    min-width: 44px;
}

.recent-modal .recent-list {
    overflow: auto;
    padding-top: 8px;
}

.recent-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.recent-item .title {
    font-family: 'Bitcount', monospace;
    font-size: 0.95rem;
    color: #333;
}

.recent-item .link {
    font-size: 0.8rem;
    color: #007bff;
    word-break: break-all;
}

.focus-reel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.98);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.2);
    z-index: 3002;
    width: min(920px, 92vw);
    max-height: 86vh;
    display: flex;
    gap: 20px;
    padding: 16px 16px 16px 16px;
}

.focus-reel .reel-card { width: 320px; flex: 0 0 320px; }
.focus-reel .reel-thumbnail { aspect-ratio: 9 / 16; }
.focus-reel .reel-content { display: none; }

.focus-analysis { flex: 1 1 auto; overflow: auto; padding-right: 6px; }
.focus-analysis-header { margin-bottom: 20px; }
.focus-analysis-title { font-family: 'Bitcount', monospace; font-size: 1.2rem; color: #111; margin: 0 0 8px 0; }
.focus-analysis-subtitle { font-size: 0.95rem; color: #666; margin-bottom: 20px; }

.focus-action-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    padding: 0 4px;
    flex-wrap: wrap;
}

.focus-analysis-text { font-size: 0.95rem; line-height: 1.7; color: #333; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: break-word; }

.ios-card {
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 14px 16px;
}

.copy-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.copy-btn {
    background: rgba(49, 130, 206, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    min-width: 40px;
    height: 36px;
    position: relative;
    touch-action: manipulation;
}

.copy-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.copy-btn:hover { 
    background: rgba(44, 90, 160, 0.9);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(49, 130, 206, 0.3);
}

.copy-btn::after {
    content: "copy";
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    color: #666;
    padding: 4px 8px;
    font-family: 'Bitcount', monospace;
    font-size: 0.75rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    white-space: nowrap;
    z-index: 1000;
}

.copy-btn:hover::after {
    opacity: 1;
}

.copy-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.focus-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.focus-delete-btn {
    background: rgba(229, 62, 62, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-weight: 500;
    min-width: 40px;
    height: 36px;
    position: relative;
    touch-action: manipulation;
}

.focus-delete-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.focus-delete-btn:hover { 
    background: rgba(197, 48, 48, 0.9);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(229, 62, 62, 0.3);
}

.focus-delete-btn::after {
    content: "delete";
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    color: #666;
    padding: 4px 8px;
    font-family: 'Bitcount', monospace;
    font-size: 0.75rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    white-space: nowrap;
    z-index: 1000;
}

.focus-delete-btn:hover::after {
    opacity: 1;
}

.focus-open-btn {
    background: rgba(56, 161, 105, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    min-width: 40px;
    height: 36px;
    position: relative;
    touch-action: manipulation;
}

.focus-open-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.focus-open-btn:hover {
    background: rgba(47, 133, 90, 0.9);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(56, 161, 105, 0.3);
}

.focus-open-btn::after {
    content: "go to";
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    color: #666;
    padding: 4px 8px;
    font-family: 'Bitcount', monospace;
    font-size: 0.75rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    white-space: nowrap;
    z-index: 1000;
}

.focus-open-btn:hover::after {
    opacity: 1;
}

.focus-pin-btn {
    background: rgba(214, 158, 46, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-weight: 500;
    min-width: 40px;
    height: 36px;
    position: relative;
    touch-action: manipulation;
}

.focus-pin-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.focus-pin-btn:hover { 
    background: rgba(183, 121, 31, 0.9);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(214, 158, 46, 0.3);
}

.focus-pin-btn::after {
    content: "pin";
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    color: #666;
    padding: 4px 8px;
    font-family: 'Bitcount', monospace;
    font-size: 0.75rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    white-space: nowrap;
    z-index: 1000;
}

.focus-pin-btn:hover::after {
    opacity: 1;
}

/* Rerun button styling */
.focus-rerun-btn {
    background: rgba(49, 130, 206, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    min-width: 40px;
    height: 36px;
    position: relative;
    touch-action: manipulation;
}

.focus-rerun-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.focus-rerun-btn:hover {
    background: rgba(44, 90, 160, 0.9);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(49, 130, 206, 0.3);
}

.focus-rerun-btn::after {
    content: "rerun";
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    color: #666;
    padding: 4px 8px;
    font-family: 'Bitcount', monospace;
    font-size: 0.75rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    white-space: nowrap;
    z-index: 1000;
}

.focus-rerun-btn:hover::after {
    opacity: 1;
}

.focus-close-btn {
    background: #f5f5f5;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    min-height: 44px;
    min-width: 44px;
}
.focus-close-btn:hover { background: #e9e9e9; color: #333; }

.focus-reel.show {
    transform: translate(-50%, -50%) scale(1);
}

/* Footer */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: transparent;
    padding: 8px 0;
    z-index: 1000;
    pointer-events: none;
}

.footer-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    pointer-events: auto;
}

.footer-btn {
    font-family: 'Bitcount', monospace;
    font-size: 0.8rem;
    color: #999;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    background: transparent;
    border: none;
    cursor: pointer;
    touch-action: manipulation;
}

.footer-btn:hover {
    color: #666;
    background: rgba(0, 0, 0, 0.05);
    text-decoration: none;
}

/* Impressum & About Pages */
.impressum-main, .about-main {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px 100px 20px;
}

.impressum-content, .about-content {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.impressum-title, .about-title {
    font-family: 'Bitcount', monospace;
    font-size: 2.5rem;
    font-weight: normal;
    color: #333;
    margin-bottom: 40px;
    text-align: center;
    letter-spacing: 1px;
}

.impressum-section, .about-section {
    margin-bottom: 30px;
}

.impressum-section h3, .about-section h3 {
    font-family: 'Bitcount', monospace;
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 8px;
}

.impressum-section h4, .about-section h4 {
    font-family: 'Bitcount', monospace;
    font-size: 1.1rem;
    color: #555;
    margin: 20px 0 10px 0;
}

.impressum-info, .impressum-text, .about-text {
    line-height: 1.7;
    color: #555;
}

.impressum-info p {
    margin-bottom: 8px;
}

.impressum-text p, .about-text p {
    margin-bottom: 15px;
}

.impressum-text ul, .about-text ul {
    margin: 15px 0 15px 20px;
}

.impressum-text li, .about-text li {
    margin-bottom: 8px;
}

.impressum-footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #999;
}

.dev-intro {
    text-align: center;
    margin-bottom: 30px;
}

.dev-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #666;
    font-style: italic;
}

.tech-stack {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.tech-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.contact-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
}

.contact-info p {
    margin-bottom: 8px;
}

.signature {
    font-family: 'Bitcount', monospace;
    font-style: italic;
    color: #666;
    text-align: right;
    margin-top: 30px;
    font-size: 1.1rem;
}

/* Login Page Styles */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fafafa;
    background-image: radial-gradient(circle, #e0e0e0 1px, transparent 1px);
    background-size: 20px 20px;
    padding: 20px;
}

.login-content {
    background: white;
    border-radius: 16px;
    padding: 60px 50px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 400px;
    width: 100%;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-logo {
    font-family: 'Bitcount', monospace;
    font-size: 4rem;
    font-weight: normal;
    color: #000;
    letter-spacing: 3px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 50px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-input {
    padding: 16px 20px;
    font-size: 1rem;
    font-family: 'Bitcount', monospace;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: #fff;
    transition: all 0.3s ease;
    outline: none;
    width: 100%;
    box-sizing: border-box;
    min-height: 44px;
}

.form-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-input::placeholder {
    color: #999;
    font-family: inherit;
}

.login-btn {
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 500;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #000;
    color: white;
    font-family: 'Bitcount', monospace;
    margin-top: 10px;
    min-height: 44px;
    touch-action: manipulation;
}

.login-btn:hover {
    background: #111;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.login-btn:active {
    transform: translateY(0);
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
    font-size: 0.9rem;
    margin-bottom: 10px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* User Icon Styles */
.user-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #000;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Bitcount', monospace;
    font-size: 1.1rem;
    font-weight: bold;
    border: 2px solid transparent;
    touch-action: manipulation;
    min-height: 44px;
    min-width: 44px;
}

.user-icon:hover {
    background: #111;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.user-dropdown {
    position: absolute;
    top: 50px;
    right: -10px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    min-width: 150px;
    max-width: 85vw;
    z-index: 1000;
    border: 1px solid #e0e0e0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
    font-family: 'Bitcount', monospace;
    font-size: 0.9rem;
    color: #333;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    touch-action: manipulation;
    min-height: 44px;
}

.user-dropdown-item:hover {
    background: #f8f9fa;
}

.user-dropdown-item.logout {
    color: #dc3545;
}

.user-dropdown-item.logout:hover {
    background: #f8d7da;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        padding: 0 15px;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 16px;
    }

    .container {
        padding: 0 12px;
    }
    
    .header {
        padding: 20px 0 40px 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .logo {
        font-size: 2.2rem;
        letter-spacing: 1px;
    }
    
    .header-right {
        width: 100%;
        justify-content: space-between;
        gap: 8px;
    }
    
    .bug-btn, .stacks-btn {
        font-size: 0.85rem;
        padding: 6px 12px;
    }
    
    .user-button {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .input-section {
        bottom: 12px;
        padding: 8px 12px;
    }
    
    .input-container {
        gap: 10px;
        padding: 8px 10px;
    }
    
    .url-input {
        padding: 12px 14px;
        font-size: 0.95rem;
        border-radius: 8px;
    }
    
    .go-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .reel-card {
        border-radius: 8px;
    }
    
    .reel-thumbnail {
        aspect-ratio: 9 / 15;
    }
    
    .focus-reel {
        width: min(95vw, 600px);
        flex-direction: column;
        gap: 12px;
        padding: 12px;
    }
    
    .focus-reel .reel-card {
        width: 100%;
        flex: 0 0 auto;
    }
    
    .focus-reel .reel-thumbnail {
        aspect-ratio: 9 / 12;
        max-height: 300px;
    }
    
    .analysis-panel {
        width: 100%;
        right: 0;
        left: 0;
    }
    
    .main {
        padding-bottom: 60px;
    }
    
    .impressum-content, .about-content {
        padding: 24px;
    }
    
    .impressum-title, .about-title {
        font-size: 2rem;
        margin-bottom: 24px;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 0 12px;
    }
    
    .header {
        padding: 16px 0 32px 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .logo {
        font-size: 2rem;
        letter-spacing: 0.5px;
    }
    
    .header-right {
        width: 100%;
        justify-content: space-between;
        gap: 8px;
    }
    
    .bug-btn, .stacks-btn {
        font-size: 0.75rem;
        padding: 5px 10px;
    }
    
    .ai-status {
        width: 8px;
        height: 8px;
    }
    
    .user-button {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .user-dropdown {
        right: -10px;
        min-width: 160px;
        max-width: 90vw;
    }
    
    .input-section {
        bottom: 10px;
        padding: 6px 8px;
    }
    
    .input-container {
        gap: 8px;
        padding: 8px 10px;
    }
    
    .input-wrapper {
        gap: 6px;
    }
    
    .url-input {
        padding: 11px 12px;
        font-size: 0.9rem;
        border-radius: 6px;
    }
    
    .go-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .header {
        padding: 16px 0 28px 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .logo {
        font-size: 1.8rem;
        letter-spacing: 0.5px;
    }
    
    .header-right {
        width: 100%;
        justify-content: space-between;
        gap: 8px;
    }
    
    .bug-btn, .stacks-btn {
        font-size: 0.75rem;
        padding: 4px 8px;
        flex: 1;
        white-space: nowrap;
        min-height: 36px;
    }
    
    .input-section {
        bottom: 8px;
        padding: 6px 10px;
    }
    
    .input-container {
        gap: 8px;
        padding: 8px 10px;
    }
    
    .input-wrapper {
        gap: 6px;
    }
    
    .url-input {
        padding: 11px 12px;
        font-size: 0.9rem;
        border-radius: 8px;
    }
    
    .go-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .reels-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .reel-card {
        border-radius: 6px;
    }
    
    .focus-reel {
        width: min(96vw, 400px);
        flex-direction: column;
        padding: 10px;
        max-height: 90vh;
    }
    
    .focus-reel .reel-card {
        width: 100%;
    }
    
    .focus-reel .reel-thumbnail {
        aspect-ratio: 9 / 12;
        max-height: 250px;
    }
    
    .focus-analysis {
        flex: 1;
        padding-right: 4px;
    }
    
    .focus-analysis-title {
        font-size: 1rem;
    }
    
    .focus-analysis-text {
        font-size: 0.85rem;
        line-height: 1.5;
    }
    
    .focus-action-buttons {
        gap: 6px;
        margin-bottom: 12px;
    }
    
    .focus-controls {
        top: 8px;
        right: 8px;
        gap: 6px;
    }
    
    .copy-btn, .focus-delete-btn, .focus-open-btn, .focus-pin-btn, .focus-rerun-btn {
        padding: 4px 8px;
        font-size: 0.8rem;
        min-width: 32px;
        height: 32px;
    }
    
    .main {
        padding-bottom: 70px;
    }
    
    .empty-state {
        padding: 0 10px;
    }
    
    .empty-title {
        font-size: 1.6rem;
    }
    
    .empty-subtitle {
        font-size: 0.9rem;
    }
    
    .category-stacks {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 12px;
    }
    
    .category-folder.expanded .category-reels {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
    }
    
    .bug-modal-content {
        width: 95%;
        max-height: 85vh;
    }
    
    .login-content {
        padding: 40px 24px;
    }
    
    .login-logo {
        font-size: 2.5rem;
        margin-bottom: 30px;
    }
    
    .impressum-content, .about-content {
        padding: 20px;
    }
    
    .impressum-title, .about-title {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }
    
    .impressum-section h3, .about-section h3 {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }
}

/* Extra small devices (< 360px) */
@media (max-width: 359px) {
    .header {
        padding: 12px 0 20px 0;
    }
    
    .logo {
        font-size: 1.4rem;
    }
    
    .bug-btn, .stacks-btn {
        display: none;
    }
    
    .header-right {
        width: auto;
        gap: 8px;
    }
    
    .url-input {
        padding: 10px 10px;
        font-size: 0.85rem;
    }
    
    .go-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .reels-grid {
        gap: 8px;
    }
    
    .reel-card {
        border-radius: 4px;
    }
}

/* Two-column layout for about page */
.about-two-col {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 24px;
    align-items: start;
}

.about-illustration {
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-sticker {
    width: 100%;
    max-width: 360px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 8px 24px rgba(0,0,0,0.15));
}

@media (max-width: 900px) {
    .about-two-col { grid-template-columns: 1fr; }
    .about-illustration { order: -1; margin-bottom: 12px; }
    .about-sticker { max-width: 280px; }
}

/* Bug Report Button */
.bug-btn {
    background: rgba(255, 107, 53, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: normal;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 10px;
    font-family: 'Bitcount', monospace;
    min-height: 44px;
    touch-action: manipulation;
}

.bug-btn:hover {
    background: rgba(255, 107, 53, 0.9);
    transform: translateY(-1px);
}

/* Bug Report Modal */
.bug-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* Settings modal should appear above input section */
#settingsModal {
    z-index: 2000;
}

.bug-modal.hidden {
    display: none;
}

.bug-modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    -webkit-overflow-scrolling: touch;
}

.bug-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
    flex-wrap: wrap;
}

.bug-modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: normal;
    color: #333;
    font-family: 'Bitcount', monospace;
}

.bug-close {
    font-size: 24px;
    cursor: pointer;
    color: #666;
    transition: color 0.2s ease;
    touch-action: manipulation;
}

.bug-close:hover {
    color: #333;
}

.bug-modal-body {
    padding: 24px;
}

.bug-modal-body .form-group {
    margin-bottom: 20px;
}

.bug-modal-body label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-family: 'Bitcount', monospace;
}

.bug-modal-body textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s ease;
    -webkit-appearance: none;
}

.bug-modal-body textarea:focus {
    outline: none;
    border-color: #ff6b35;
}

.bug-modal-body input[type="file"] {
    width: 100%;
    padding: 8px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
    -webkit-appearance: none;
}

.bug-modal-body input[type="file"]:focus {
    outline: none;
    border-color: #ff6b35;
}

.bug-modal-body small {
    display: block;
    margin-top: 4px;
    color: #666;
    font-size: 0.85rem;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    flex-wrap: wrap;
}

.btn-cancel {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-family: 'Bitcount', monospace;
    min-height: 44px;
    touch-action: manipulation;
}

.btn-cancel:hover {
    background: #545b62;
}

.btn-submit {
    background: #ff6b35;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-family: 'Bitcount', monospace;
    min-height: 44px;
    touch-action: manipulation;
}

.btn-submit:hover {
    background: #e55a2b;
}

.btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}
