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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f4;
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 40px;
}

.header-text h1 {
    font-size: 2em;
    margin-bottom: 4px;
    font-weight: 700;
    color: #222;
}

.header-text p {
    font-size: 1em;
    color: #666;
}

.controls {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 24px;
}

.filters {
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-icon {
    font-size: 0.95em;
    color: #999;
    line-height: 1;
}

select {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    color: #555;
    background: white;
    transition: border-color 0.2s ease;
}

select:focus {
    outline: none;
    border-color: #999;
}

.stats {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.stat-item {
    background: white;
    padding: 12px 20px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    text-align: center;
    min-width: 100px;
}

.stat-number {
    display: block;
    font-size: 1.8em;
    font-weight: 700;
    color: #222;
}

.stat-label {
    font-size: 0.9em;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ideas-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.idea-card {
    background: white;
    padding: 24px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    position: relative;
    cursor: pointer;
}

.idea-card:hover {
    border-color: #bbb;
}

.idea-card.voted {
    border-left: 4px solid #4CAF50;
}

.idea-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.idea-header .vote-button {
    flex-shrink: 0;
}

.idea-title {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 0;
    color: #333;
    line-height: 1.3;
}

.idea-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 1.05em;
}

.idea-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.questions-toggle-hint {
    font-size: 0.8em;
    color: #999;
    user-select: none;
}

.idea-card.expanded .questions-toggle-hint {
    color: #555;
}

/* Questions panel */
.questions-panel {
    display: none;
    border-top: 1px solid #eee;
    padding-top: 16px;
    margin-top: 4px;
}

.idea-card.expanded .questions-panel {
    display: block;
}

.questions-loading,
.questions-error {
    font-size: 0.9em;
    color: #999;
    padding: 8px 0;
}

.questions-error {
    color: #c0392b;
}

.questions-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.no-questions {
    font-size: 0.9em;
    color: #aaa;
    padding: 4px 0;
}

.question-item {
    background: #f8f8f8;
    border-radius: 4px;
    padding: 10px 12px;
}

.question-text {
    font-size: 0.95em;
    color: #444;
    line-height: 1.5;
}

.answer-item {
    margin-top: 6px;
    padding-left: 12px;
    border-left: 2px solid #ddd;
}

.answer-text {
    font-size: 0.9em;
    color: #666;
    line-height: 1.5;
}

.question-input-area {
    display: flex;
    gap: 8px;
}

.question-input {
    flex: 1;
    padding: 7px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9em;
    color: #333;
    background: white;
    transition: border-color 0.2s ease;
}

.question-input:focus {
    outline: none;
    border-color: #999;
}

.question-submit {
    padding: 7px 14px;
    background: #444;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.9em;
    cursor: pointer;
    transition: background 0.2s ease;
}

.question-submit:hover:not(:disabled) {
    background: #222;
}

.question-submit:disabled {
    background: #aaa;
    cursor: default;
}

.question-error {
    font-size: 0.85em;
    color: #c0392b;
    padding: 6px 0;
}

.idea-category {
    background: #ebebeb;
    color: #444;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 500;
}

.idea-date {
    font-size: 0.8em;
    color: #999;
}

.vote-button {
    background: none;
    color: #aaa;
    border: 1px solid #ddd;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.vote-button:hover:not(:disabled) {
    color: #e05555;
    border-color: #e05555;
}

.vote-button.voted {
    color: #e05555;
    border-color: #e05555;
}

.vote-button:disabled {
    cursor: default;
}

.vote-count {
    font-weight: 600;
    color: #444;
    display: flex;
    align-items: center;
    gap: 5px;
}

.loading {
    text-align: center;
    padding: 40px;
    font-size: 1.1em;
    color: #888;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.empty-state h3 {
    font-size: 1.3em;
    margin-bottom: 10px;
    color: #555;
}

.empty-state p {
    opacity: 0.8;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    header {
        flex-direction: column;
        align-items: flex-start;
    }

    .controls {
        flex-direction: column;
        gap: 15px;
    }

    .stats {
        width: 100%;
    }

    .ideas-container {
        grid-template-columns: 1fr;
    }

    .idea-card {
        padding: 20px;
    }
}