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

body {
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    color: #333;
}

.container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 상단 메뉴 */
.top-menu {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    padding: 0 40px;
    height: 120px;
    background-color: #f0f0f0;
    border-bottom: 1px solid #ddd;
}

.top-menu a {
    text-decoration: none;
    color: #333;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 3px;
    transition: all 0.25s;
}

.top-menu a:hover {
    transform: translateY(-2px);
}

/* 메인 콘텐츠 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    padding: 60px 40px;
    text-align: center;
}

/* 섹션 */
.section {
    margin: 30px 0;
}

.section h2 {
    font-size: 28px;
    font-weight: normal;
    color: #333;
}

/* 버튼 섹션 */
.buttons-section {
    display: flex;
    gap: 60px;
    justify-content: center;
    margin-top: 40px;
}

.btn {
    padding: 15px 60px;
    font-size: 20px;
    border: none;
    background-color: #fff;
    color: #333;
    cursor: pointer;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.btn:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* 팀 이름 입력 섹션 */
.input-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin-top: 60px;
}

.input-section p {
    font-size: 18px;
    color: #333;
}

.team-input {
    width: 100%;
    max-width: 400px;
    padding: 15px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 5px;
    transition: border-color 0.3s;
}

.team-input:focus {
    outline: none;
    border-color: #333;
}

.next-btn {
    padding: 12px 40px;
    font-size: 16px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.next-btn:hover {
    background-color: #555;
}

/* 선수 입력 섹션 */
.players-input-section {
    max-width: 700px;
    margin: 40px auto;
    padding: 30px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.player-input-field {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
}

.player-number {
    min-width: 40px;
    font-weight: bold;
    color: #333;
}

.player-input-field input {
    flex: 1;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.player-input-field input:focus {
    outline: none;
    border-color: #7cb342;
}

.add-player-btn {
    width: 100%;
    padding: 20px;
    margin-top: 20px;
    font-size: 24px;
    background-color: #fff;
    border: 2px solid #7cb342;
    border-radius: 3px;
    cursor: pointer;
    color: #7cb342;
    transition: all 0.3s;
}

.add-player-btn:hover {
    background-color: #7cb342;
    color: white;
}

/* 완료 버튼 */
.button-section {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.complete-btn {
    padding: 15px 60px;
    font-size: 16px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.complete-btn:hover {
    background-color: #555;
}

/* ===== 축구장 페이지 스타일 ===== */
.field-container {
    height: auto;
    flex-direction: column;
}

.field-content {
    display: flex;
    gap: 20px;
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto;
    flex: 1;
}

/* 왼쪽: 선수 목록 */
.players-list-section {
    flex: 0 0 200px;
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    max-height: 600px;
    overflow-y: auto;
}

.players-list-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    text-align: center;
    color: #333;
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
}

.players-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.player-item {
    background-color: white;
    padding: 12px;
    border-radius: 5px;
    cursor: grab;
    border: 2px solid #3498db;
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    user-select: none;
    transition: all 0.3s;
}

.player-item:hover {
    background-color: #e3f2fd;
    transform: scale(1.05);
}

.player-item:active {
    cursor: grabbing;
}

/* 중앙: 축구장 */
.field-section {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.soccer-field {
    width: 100%;
    max-width: 500px;
    aspect-ratio: 2 / 3;
    background: linear-gradient(90deg, #2d5016 0%, #3d7020 50%, #2d5016 100%);
    border: 3px solid white;
    position: relative;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}


/* 필드의 골라인 */
.soccer-field .goal-area {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 30%;
    border: 2px solid white;
    border-top: none;
}

.soccer-field .goal-area-top {
    top: 0;
    border-bottom: 2px solid white;
}

.soccer-field .goal-area-bottom {
    bottom: 0;
    border-top: 2px solid white;
}

/* 선수 원형 배치 */
.player-circle {
    position: absolute;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: #3498db;
    border: 2px solid white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: grab;
    user-select: none;
    font-size: 12px;
    color: white;
    font-weight: bold;
    text-align: center;
    padding: 5px;
    box-sizing: border-box;
    transition: all 0.2s;
    z-index: 10;
}

.player-circle:hover {
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.8);
}

.player-circle:active {
    cursor: grabbing;
}

.player-circle.dragging {
    opacity: 0.7;
    z-index: 100;
}

.player-circle .player-number {
    font-size: 16px;
}

.player-circle .player-name {
    font-size: 10px;
    opacity: 0.9;
}

/* 오른쪽: SUB 선수 */
.sub-section {
    flex: 0 0 200px;
    background-color: #fff3cd;
    padding: 20px;
    border-radius: 8px;
    max-height: 600px;
    overflow-y: auto;
}

.sub-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    text-align: center;
    color: #333;
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
}

.sub-players {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sub-player-item {
    background-color: white;
    padding: 12px;
    border-radius: 5px;
    cursor: grab;
    border: 2px solid #ff9800;
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    user-select: none;
    transition: all 0.3s;
}

.sub-player-item:hover {
    background-color: #ffe0b2;
    transform: scale(1.05);
}

.sub-player-item:active {
    cursor: grabbing;
}

/* 저장 버튼 */
.button-section {
    display: flex;
    justify-content: center;
    padding: 20px;
}

.save-btn {
    padding: 15px 60px;
    font-size: 16px;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.save-btn:hover {
    background-color: #229954;
}

/* 반응형 */
@media (max-width: 1024px) {
    .field-content {
        flex-direction: column;
        gap: 20px;
    }

    .players-list-section,
    .sub-section {
        flex: none;
    }
}