* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #000;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

#app {
    text-align: center;
    max-width: 600px;
    width: 100%;
}

h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

h2 {
    font-size: 32px;
    margin-bottom: 16px;
}

p {
    font-size: 18px;
    margin-bottom: 12px;
    opacity: 0.8;
}

#start-btn {
    margin-top: 40px;
    padding: 20px 60px;
    font-size: 24px;
    background: #fff;
    color: #000;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

#start-btn:hover {
    background: #eee;
}

/* Audio visualizer */
#visualizer {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 4px;
    height: 40px;
    margin-bottom: 16px;
}

#visualizer .bar {
    width: 8px;
    background: #fff;
    border-radius: 4px;
    transition: height 0.05s ease;
    min-height: 4px;
}

#status {
    font-size: 16px;
    opacity: 0.5;
    margin-bottom: 20px;
}

/* Questions list - scrolling feed like iOS */
#questions-list {
    min-height: 200px;
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 12px;
    padding: 10px 0;
    scroll-behavior: smooth;
}

/* Hide scrollbar but keep functionality */
#questions-list::-webkit-scrollbar {
    display: none;
}
#questions-list {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.question-item {
    font-size: 28px;
    line-height: 1.3;
    padding: 12px 16px;
    border-radius: 8px;
    transition: all 0.4s ease;
    opacity: 1;
    transform: translateY(0);
    flex-shrink: 0;
    color: #00ff88;
}

.transcript-item {
    font-size: 16px;
    line-height: 1.4;
    padding: 8px 16px;
    border-radius: 6px;
    opacity: 0.6;
    color: #888;
    flex-shrink: 0;
    text-align: left;
}

/* New question animation - starts below and fades in */
.question-item.new {
    opacity: 0;
    transform: translateY(20px);
}

/* Questions stand out with green color and background */
.question-item {
    background: rgba(0, 255, 136, 0.1);
    border-left: 3px solid rgba(0, 255, 136, 0.5);
}

/* Only show last 6 items total (mix of transcript + questions) */
#questions-list > *:nth-last-child(n+7) {
    display: none;
}

/* Fade older items */
#questions-list > *:nth-last-child(5) { opacity: 0.4; }
#questions-list > *:nth-last-child(6) { opacity: 0.2; }

.waiting {
    opacity: 0.4;
    font-style: italic;
    font-size: 20px;
}

/* Pinned questions section */
#pinned-questions {
    margin-bottom: 16px;
}

#pinned-questions:empty {
    display: none;
}

.pinned-item {
    font-size: 22px;
    line-height: 1.3;
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 8px;
    background: rgba(255, 200, 50, 0.15);
    border-left: 3px solid rgba(255, 200, 50, 0.6);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.pinned-item:hover {
    background: rgba(255, 200, 50, 0.25);
}

.pinned-item::before {
    content: '📌 ';
    font-size: 14px;
}

.pinned-item::after {
    content: '✕';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.4;
    font-size: 16px;
}

.pinned-item:hover::after {
    opacity: 0.8;
}

/* Make regular questions tappable */
.question-item {
    cursor: pointer;
}

.question-item:hover {
    background: rgba(255, 255, 255, 0.15);
}

.question-item:active {
    transform: scale(0.98);
}

/* Stop button */
#stop-btn {
    margin-top: 40px;
    padding: 12px 40px;
    font-size: 18px;
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s, border-color 0.2s;
}

#stop-btn:hover {
    opacity: 1;
    border-color: rgba(255, 255, 255, 0.6);
}

/* Results screen */
#listening-screen h2 {
    margin-bottom: 20px;
}

#listening-screen button {
    margin: 10px;
    padding: 12px 24px;
    font-size: 16px;
    background: #fff;
    color: #000;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

#listening-screen button:hover {
    background: #eee;
}

#listening-screen details {
    background: rgba(255, 255, 255, 0.05);
    padding: 16px;
    border-radius: 8px;
    margin-top: 16px;
}

#listening-screen summary {
    cursor: pointer;
    font-size: 16px;
}

#listening-screen pre {
    text-align: left;
    font-size: 14px;
    margin-top: 12px;
    white-space: pre-wrap;
    word-wrap: break-word;
}
