/* ============================================
   PROSE CONTESTS STYLES
   ============================================ */

.contest-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-8) var(--spacing-4);
}

.contest-page__title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--spacing-8);
    color: var(--color-text-primary);
}

/* Active Contest Hero */
.contest-hero {
    background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 50%, #2563eb 100%);
    border-radius: var(--border-radius-lg, 12px);
    padding: var(--spacing-8);
    color: white;
    margin-bottom: var(--spacing-8);
    position: relative;
    overflow: hidden;
}

.contest-hero::after {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.contest-hero__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-4);
}

.contest-hero__title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: var(--spacing-2);
}

.contest-hero__description {
    opacity: 0.9;
    margin-bottom: var(--spacing-4);
    line-height: 1.6;
}

.contest-hero__theme {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 4px 16px;
    font-size: 0.875rem;
    margin-bottom: var(--spacing-4);
}

.contest-hero__round {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.contest-hero__round--round1 {
    background: rgba(34, 197, 94, 0.3);
    border: 1px solid rgba(34, 197, 94, 0.5);
}

.contest-hero__round--submission {
    background: rgba(59, 130, 246, 0.3);
    border: 1px solid rgba(59, 130, 246, 0.5);
}

.contest-hero__round--round2 {
    background: rgba(234, 179, 8, 0.3);
    border: 1px solid rgba(234, 179, 8, 0.5);
}

/* Stats Grid */
.contest-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-4);
    margin-bottom: var(--spacing-6);
}

.contest-stat {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius, 8px);
    padding: var(--spacing-4);
}

.contest-stat__label {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-bottom: 4px;
}

.contest-stat__value {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Actions */
.contest-hero__actions {
    display: flex;
    gap: var(--spacing-3);
    flex-wrap: wrap;
}

.contest-btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--border-radius, 8px);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.contest-btn--primary {
    background: white;
    color: #4f46e5;
}

.contest-btn--primary:hover {
    background: #f0f0ff;
    transform: translateY(-1px);
}

.contest-btn--secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.contest-btn--secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Entries Grid */
.contest-entries {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-6);
}

@media (max-width: 991px) {
    .contest-entries {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .contest-entries {
        grid-template-columns: 1fr;
    }
}

/* Entry Card */
.contest-entry {
    background: var(--color-surface, white);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius, 8px);
    padding: var(--spacing-6);
    transition: all 0.2s ease;
}

.contest-entry:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: var(--color-primary);
}

.contest-entry__author {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
    margin-bottom: var(--spacing-4);
}

.contest-entry__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--color-primary);
    font-size: 0.875rem;
    overflow: hidden;
}

.contest-entry__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contest-entry__author-name {
    font-weight: 600;
    color: var(--color-text-primary);
    text-decoration: none;
}

.contest-entry__author-name:hover {
    color: var(--color-primary);
}

.contest-entry__title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: var(--spacing-3);
    color: var(--color-text-primary);
}

.contest-entry__content {
    color: var(--color-text-secondary);
    line-height: 1.6;
    max-height: 120px;
    overflow: hidden;
    margin-bottom: var(--spacing-4);
    position: relative;
}

.contest-entry__content::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(transparent, var(--color-surface, white));
}

.contest-entry__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--spacing-4);
    border-top: 1px solid var(--color-border);
}

.contest-entry__votes {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.contest-entry__vote-btns {
    display: flex;
    gap: var(--spacing-2);
}

.vote-btn {
    padding: 6px 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.15s ease;
}

.vote-btn--up {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.vote-btn--up:hover {
    background: rgba(34, 197, 94, 0.2);
    transform: scale(1.1);
}

.vote-btn--down {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.vote-btn--down:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: scale(1.1);
}

.contest-entry__read-more {
    display: block;
    text-align: center;
    margin-top: var(--spacing-3);
    color: var(--color-primary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
}

.contest-entry__read-more:hover {
    text-decoration: underline;
}

/* Submit Section */
.contest-submit {
    background: var(--color-bg-secondary, #f9fafb);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius, 8px);
    padding: var(--spacing-6);
    margin-bottom: var(--spacing-6);
}

.contest-submit__title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: var(--spacing-2);
}

/* Past Contests */
.contest-past-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-6);
}

@media (max-width: 600px) {
    .contest-past-grid {
        grid-template-columns: 1fr;
    }
}

.contest-past-card {
    background: var(--color-surface, white);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius, 8px);
    padding: var(--spacing-6);
    transition: all 0.2s ease;
}

.contest-past-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.contest-past-card__title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: var(--spacing-2);
}

.contest-past-card__winner {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
    margin-bottom: var(--spacing-3);
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

/* Modal */
.contest-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: var(--spacing-4);
}

.contest-modal--open {
    display: flex;
}

.contest-modal__content {
    background: var(--color-surface, white);
    border-radius: var(--border-radius-lg, 12px);
    padding: var(--spacing-8);
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.contest-modal__close {
    float: right;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-secondary);
    padding: 4px;
}

.contest-modal__close:hover {
    color: var(--color-text-primary);
}
