/* Ideas Page Layout */
.ideas-container {
    display: grid;
    grid-template-columns: 240px 1fr;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - 64px);
}

/* Sidebar */
.ideas-sidebar {
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 24px 16px;
    position: sticky;
    top: 64px;
    height: calc(100vh - 64px);
    display: flex;
    flex-direction: column;
}

.sidebar-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.sidebar-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s;
}

.sidebar-link:hover {
    background: var(--bg-tertiary);
}

.sidebar-link.active {
    background: var(--bg-tertiary);
    color: #e0115f;
}

.sidebar-link svg {
    flex-shrink: 0;
}

.btn-post {
    width: 100%;
    padding: 14px;
    background: #e0115f;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: auto;
}

.btn-post:hover {
    background: #c00f52;
}

/* Feed Area */
.ideas-feed {
    background: var(--bg-primary);
}

/* Feed Tabs */
.feed-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
    position: sticky;
    top: 64px;
    z-index: 10;
}

.feed-tab {
    flex: 1;
    padding: 16px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.feed-tab:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.feed-tab.active {
    color: var(--text-primary);
    border-bottom-color: var(--text-primary);
}

/* Post Composer */
.post-composer {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
    display: flex;
    gap: 12px;
}

.composer-avatar {
    flex-shrink: 0;
}

.avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff1f73 0%, #e0115f 100%);
}

.composer-input-wrapper {
    flex: 1;
}

.composer-input {
    width: 100%;
    min-height: 80px;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 12px;
}

.composer-input:focus {
    outline: none;
    border-color: #e0115f;
}

.composer-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.composer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-gif {
    padding: 8px 16px;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-gif:hover {
    background: var(--bg-tertiary);
}

.btn-submit-post {
    padding: 8px 24px;
    background: #e0115f;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-submit-post:hover {
    background: #c00f52;
}

/* Sort Controls */
.sort-controls {
    display: flex;
    gap: 0;
    padding: 0 24px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
    position: sticky;
    top: 128px;
    z-index: 9;
}

.sort-btn {
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.sort-btn:hover {
    color: var(--text-primary);
}

.sort-btn.active {
    color: #e0115f;
    border-bottom-color: #e0115f;
}

/* Time Filters */
.time-filters {
    display: flex;
    gap: 0;
    padding: 0 24px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
    position: sticky;
    top: 174px;
    z-index: 8;
}

.time-filter {
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.time-filter:hover {
    color: var(--text-primary);
}

.time-filter.active {
    color: #e0115f;
    border-bottom-color: #e0115f;
}

/* Growth Block */
.ideas-growth-banner {
    margin: 16px 24px;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid rgba(224, 17, 95, 0.3);
    background: linear-gradient(135deg, rgba(224, 17, 95, 0.12), rgba(16, 185, 129, 0.1));
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.ideas-growth-title {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.ideas-growth-subtitle {
    margin: 0;
    color: var(--text-secondary);
    font-size: 13px;
}

.btn-new-idea {
    border: 1px solid rgba(224, 17, 95, 0.45);
    background: rgba(224, 17, 95, 0.14);
    color: #e0115f;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
    padding: 10px 16px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.btn-new-idea:hover {
    background: rgba(224, 17, 95, 0.2);
    transform: translateY(-1px);
}

.recently-promoted-section {
    margin: 0 24px 16px;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.recently-promoted-header h3 {
    margin: 0 0 10px;
    font-size: 14px;
    color: var(--text-primary);
}

.recently-promoted-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.promoted-market-card {
    text-decoration: none;
    color: inherit;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-tertiary);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.promoted-market-card:hover {
    border-color: rgba(224, 17, 95, 0.35);
    transform: translateY(-1px);
}

.promoted-market-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.promoted-market-meta {
    font-size: 12px;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Feed List */
.feed-list {
    padding: 0;
}

/* Feed Item */
.feed-item {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
    transition: all 0.2s;
    cursor: pointer;
}

.feed-item:hover {
    background: var(--bg-tertiary);
}

.feed-item-promoted {
    border-left: 3px solid #22c55e;
}

.feed-item-header {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.feed-item-avatar {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.feed-item-info {
    flex: 1;
    min-width: 0;
}

.feed-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.feed-item-username {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 15px;
}

.feed-item-time {
    color: var(--text-secondary);
    font-size: 13px;
}

.feed-item-prediction {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 8px;
}

.feed-item-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.4;
    text-decoration: none;
    display: block;
}

.feed-item-title:hover {
    text-decoration: underline;
}

.feed-item-status {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 12px;
}

.feed-item-resolution {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 10px;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    border-left: 3px solid #e0115f;
}

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

.promoted-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    font-size: 12px;
    font-weight: 700;
}

.promoted-link {
    font-size: 12px;
    font-weight: 600;
    color: #38bdf8;
    text-decoration: none;
}

.promoted-link:hover {
    text-decoration: underline;
}

.promotion-progress {
    margin-bottom: 12px;
}

.promotion-progress-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.promotion-progress-track {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    overflow: hidden;
}

.promotion-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #e0115f, #22c55e);
    border-radius: 999px;
    transition: width 0.3s ease;
}

.feed-item-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 13px;
}

.stat-signal {
    color: #e0115f;
    font-weight: 600;
}

.stat-votes {
    color: var(--text-secondary);
}

.feed-item-image {
    max-width: 100%;
    border-radius: 12px;
    margin-bottom: 12px;
}

.feed-item-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.feed-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.feed-action-btn:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.feed-action-btn.upvote-btn.voted {
    color: #e0115f;
    background: rgba(224, 17, 95, 0.1);
}

.feed-action-btn.upvote-btn.voted:hover {
    background: rgba(224, 17, 95, 0.15);
}

.vote-count {
    margin-left: 4px;
    font-weight: 600;
}

.btn-buy {
    margin-left: auto;
    padding: 10px 24px;
    background: #e0115f;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-buy:hover {
    background: #c00f52;
}

.btn-convert {
    margin-left: auto;
    padding: 10px 24px;
    background: #e0115f;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-convert:hover {
    background: #c00f52;
}

/* Reputation Tier Badges */
.tier-badge {
    display: inline-block;
    font-size: 12px;
    margin-left: 4px;
}

.tier-diamond {
    color: #60a5fa;
}

.tier-gold {
    color: #fbbf24;
}

.tier-blue {
    color: #10b981;
    font-weight: 700;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
}

.status-review {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.status-market {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.status-archived {
    background: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
}

.promotion-celebration {
    position: relative;
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.45), 0 18px 40px rgba(34, 197, 94, 0.16);
    animation: promotePulse 1.1s ease;
}

.promotion-confetti {
    position: absolute;
    pointer-events: none;
    left: 0;
    right: 0;
    top: 0;
    height: 70px;
    overflow: hidden;
}

.promotion-confetti span {
    position: absolute;
    top: -12px;
    width: 7px;
    height: 10px;
    border-radius: 2px;
    animation: confettiDrop 1s ease forwards;
}

.promotion-toast {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1300;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 260px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(34, 197, 94, 0.35);
    background: rgba(10, 18, 12, 0.95);
    color: #ecfdf5;
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.28);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.promotion-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.promotion-toast strong {
    font-size: 13px;
}

.promotion-toast span,
.promotion-toast a {
    color: #bbf7d0;
    font-size: 12px;
}

@keyframes promotePulse {
    0% { transform: scale(1); }
    20% { transform: scale(1.01); }
    100% { transform: scale(1); }
}

@keyframes confettiDrop {
    from {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    to {
        transform: translateY(84px) rotate(220deg);
        opacity: 0;
    }
}

/* Modal Styles */
.idea-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.idea-modal {
    background: var(--bg-secondary);
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.idea-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.idea-modal-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.idea-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.idea-modal-close:hover {
    background: var(--border-hover);
}

.idea-form {
    padding: 24px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #e0115f;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

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

.btn-cancel,
.btn-submit {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-cancel {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-cancel:hover {
    background: var(--border-hover);
}

.btn-submit {
    background: #e0115f;
    color: #fff;
}

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

.form-error {
    margin-top: 12px;
    padding: 12px;
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid #f87171;
    border-radius: 8px;
    color: #f87171;
    font-size: 14px;
    display: none;
}

.form-error:not(:empty) {
    display: block;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    font-size: 16px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
}

/* Responsive */
@media (max-width: 968px) {
    .ideas-container {
        grid-template-columns: 1fr;
    }

    .ideas-sidebar {
        display: none;
    }

    .sort-controls {
        top: 64px;
    }

    .time-filters {
        top: 110px;
    }

    .ideas-growth-banner,
    .recently-promoted-section {
        margin-left: 16px;
        margin-right: 16px;
    }
}

@media (max-width: 640px) {
    .feed-tabs {
        overflow-x: auto;
        scrollbar-width: none;
    }

    .feed-tabs::-webkit-scrollbar {
        display: none;
    }

    .feed-tab {
        white-space: nowrap;
        flex: none;
    }

    .time-filters {
        overflow-x: auto;
        scrollbar-width: none;
    }

    .time-filters::-webkit-scrollbar {
        display: none;
    }

    .time-filter {
        white-space: nowrap;
    }

    .feed-item-actions {
        flex-wrap: wrap;
    }

    .btn-buy {
        width: 100%;
        margin-left: 0;
    }

    .ideas-growth-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-new-idea {
        width: 100%;
        text-align: center;
    }
}
