/* home.css */

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

.competition-container h1 {
    margin-bottom: 15px;
}

/* 헤더 스타일 */
.header-with-button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.header-with-button h1 {
    font-size: 28px;
    color: var(--text-color);
    font-weight: 600;
    margin: 0;
}

.create-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 8px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.create-button:hover {
    background-color: var(--primary-hover-color);
}

/* 필터 폼 스타일 */
.filter-form {
    margin-bottom: 24px;
}

.filter-form select {
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-color);
    background-color: white;
    min-width: 200px;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.filter-form select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* 대회 카드 스타일 */
.competition-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.event-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
    height: 100%;
}

.event-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.event-image {
    width: 100%;
    height: 180px;
    object-fit: contain;
    object-position: top center;
    background: var(--bg-light);
}

.event-details {
    padding: 20px;
}

.event-title-container {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

/* 상태 뱃지 기본 스타일 */
.status-badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    line-height: 1;
    white-space: nowrap;
}

/* 시작전/접수전 상태 */
.status-badge.시작전,
.status-badge.접수전 {
    background-color: #E9EEF8;
    color: #2256B2;
}

/* 접수중 상태 */
.status-badge.접수중 {
    background-color: rgba(34, 86, 178, 0.1);
    color: #2256B2;
    border: 1px solid #2256b233;
}

/* 진행중 상태 */
.status-badge.진행중 {
    background-color: #2256B2;
    color: white;
}

/* 접수마감 상태 */
.status-badge.접수마감 {
    background-color: #FFE8E8;
    color: #E74C3C;
    border: 1px solid #e74d3c33;
}

/* 종료됨 상태 */
.status-badge.종료됨 {
    background-color: #7F8C8D;
    color: white;
}

.event-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.4;
}

.event-info-container {
    display: flex;
    flex-direction: column;
}

.event-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.event-icon {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

/* 반응형 스타일 */
@media (max-width: 768px) {
    .competition-container {
        padding: 20px;
    }

    .header-with-button {
        gap: 16px;
        font-size: .9rem;
    }

    .header-with-button h1 {
        font-size: 24px;
    }

    .competition-list {
        grid-template-columns: 1fr;
    }

    .event-card {
        max-width: 100%;
    }
}

/* 대회가 없을 때 스타일 */
.no-competition {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

.practice-button {
    background-color: white;
    color: var(--primary-hover-color);
    border: 1px solid var(--primary-color);
}

.practice-button:hover {
    background-color: transparent;
}

@media (max-width: 500px) {
    .competition-container {
        padding: 0;
    }
}
