* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

body {
    font-family: 'VT323', monospace;
    background-color: #1D1D1D;
    color: #ffffff;
    line-height: 1.6;
    min-height: 100vh;
    background-image: linear-gradient(rgba(0, 0, 0, 0.2) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(0, 0, 0, 0.2) 1px, transparent 1px);
    background-size: 16px 16px;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 20px;
}

header {
    display: flex;
    align-items: center;
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    color: #ffffff;
    font-size: 2.5em;
    text-shadow: 2px 2px #000000;
}
@media screen and (max-width: 600px) {
    h1 {
        font-size: 1.2rem; /* 작은 화면에서는 글씨 크기 줄이기 */
    }
}

main {
    display: grid;
    grid-template-columns: 300px 1fr 300px;
    grid-template-areas: "input canvas list";
    gap: 20px;
    height: calc(100vh - 100px);
}

.coordinate-input {
    grid-area: input;
    background: #2F2F2F;
    padding: 20px;
    border: 3px solid #4A4A4A;
    border-radius: 0;
    box-shadow: inset -2px -2px 0 #1A1A1A, inset 2px 2px 0 #5A5A5A;
    height: fit-content;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.input-group input {
    width: 100%;
    padding: 8px;
    border: 2px solid #5B8731;
    border-radius: 0;
    font-size: 16px;
    background: #1D1D1D;
    color: #ffffff;
    font-family: 'VT323', monospace;
    box-shadow: inset -1px -1px 0 #5B8731, inset 1px 1px 0 #7BAE49;
    
}

.input-group input:focus {
    border-color: #3498db;
    outline: none;
}

button, .emoji-button, .edit-btn, .delete-btn, .modal-buttons button {
    font-family: 'VT323', monospace;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    text-transform: uppercase;
    transition: background-color 0.3s, transform 0.2s;
    user-select: none;
    
}

button {
    background-color: #5B8731;
    color: white;
    border: 2px solid #7BAE49;
    padding: 10px 20px;
}

.emoji-container {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
    justify-content: center;
}

.emoji-button {
    padding: 2px 2px;
    font-size: 20px;
    background-color: #2F2F2F;
    border: 2px solid #4A4A4A;
    min-width: 40px;
    transition: transform 0.2s, background-color 0.2s;
    text-transform: none;
    box-shadow: none;
}

.emoji-button:hover {
    background-color: #3F3F3F;
    transform: scale(1.1);
}

.edit-btn {
    background-color: #5B8731;
    color: white;
    border: none;
    padding: 5px 10px;
}


.canvas-container {
    grid-area: canvas;
    background: #2F2F2F;
    border: 3px solid #4A4A4A;
    border-radius: 0;
    box-shadow: inset -2px -2px 0 #1A1A1A, inset 2px 2px 0 #5A5A5A;
    position: relative;
    height: fit-content;
}

#coordinate-canvas {
    width: 100%;
    height: 600px;
    border-radius: 8px;
}

.canvas-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
}

.canvas-controls button {
    width: 40px;
    height: 40px;
    padding: 0;
    font-size: 20px;
    background-color: #4A4A4A;
    border-color: #5A5A5A;
    box-shadow: inset -2px -2px 0 #2A2A2A, inset 2px 2px 0 #6A6A6A;
}

.canvas-controls button:hover {
    background-color: #5A5A5A;
}

.direction-indicators {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 2px 2px #000000;
}

.direction {
    position: absolute;
    color: #FFD700;
}



.y-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.y-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.y-toggle input[type="checkbox"] {
    appearance: none;
    width: 40px;
    height: 20px;
    background: #1D1D1D;
    border: 2px solid #5B8731;
    border-radius: 0;
    position: relative;
    cursor: pointer;
    box-shadow: inset -1px -1px 0 #3D5B20, inset 1px 1px 0 #7BAE49;
}

.y-toggle input[type="checkbox"]:checked {
    background: #5B8731;
}

.y-toggle input[type="checkbox"]:checked::before {
    left: 20px;
    background: #7BAE49;
}

.y-toggle input[type="checkbox"]::before {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    background: #4A4A4A;
    top: 0;
    left: 0;
    transition: left 0.3s;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #2F2F2F;
    padding: 20px;
    border: 3px solid #4A4A4A;
    box-shadow: inset -2px -2px 0 #1A1A1A, inset 2px 2px 0 #5A5A5A;
    max-width: 600px;
    width: 90%;
}

.modal-content h2 {
    margin-bottom: 15px;
    color: #ffffff;
    text-shadow: 2px 2px #000000;
}

.modal-content textarea {
    width: 100%;
    background: #1D1D1D;
    border: 2px solid #5B8731;
    color: #ffffff;
    padding: 10px;
    font-family: 'VT323', monospace;
    font-size: 16px;
    margin-bottom: 15px;
    box-shadow: inset -1px -1px 0 #3D5B20, inset 1px 1px 0 #7BAE49;
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.points-list {
    grid-area: list;
    background: #2F2F2F;
    padding: 20px;
    border: 3px solid #4A4A4A;
    border-radius: 0;
    box-shadow: inset -2px -2px 0 #1A1A1A, inset 2px 2px 0 #5A5A5A;
    height: fit-content;
    max-height: 610px;
    overflow-y: auto;
}


.points-list h2 {
    margin-bottom: 15px;
    color: #ffffff;
    text-shadow: 1px 1px #000000;
}

#points {
    list-style: none;
}

#points li {
    padding: 10px;
    border-bottom: 2px solid #5B8731;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    background: #1D1D1D;
    margin-bottom: 4px;
    box-shadow: inset -1px -1px 0 #3D5B20, inset 1px 1px 0 #7BAE49;
}

.settings-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #5B8731;
    transition: transform 0.2s, color 0.2s;
    box-shadow: none;
}

.settings-btn:hover {
    transform: scale(1.3);
}

.delete-btn {
    background-color: #8B0000;
    color: white;
    border: 2px solid #A52A2A;
    padding: 5px 10px;
}

.delete-btn:hover {
    background-color: #FF0000;
}



#add-nether-point {
    background-color: #8B0000;
    color: white;
    border-color: #A52A2A;
    /* box-shadow: inset -2px -2px 0 #4B0000, inset 2px 2px 0 #C54B4B; */

}

#points li:last-child {
    border-bottom: none;
   
}

.point-text{
    user-select: none;
}
.point-text:hover{
    cursor: pointer;
    color: rebeccapurple;
}



@media (max-width: 1200px) {
    main {
        grid-template-columns: 1fr;
        grid-template-areas:
            "input"
            "canvas"
            "list";
        height: auto;
    }

    #coordinate-canvas {
        height: 400px;
    }

    .container {
        padding: 10px;
    }

    .button-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}


.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #2F2F2F;
    padding: 20px;
    border: 3px solid #4A4A4A;
    box-shadow: inset -2px -2px 0 #1A1A1A, inset 2px 2px 0 #5A5A5A;
    max-width: 600px;
    width: 90%;
}

.modal-content h2 {
    margin-bottom: 15px;
    color: #ffffff;
    text-shadow: 2px 2px #000000;
}

.modal-content textarea {
    width: 100%;
    background: #1D1D1D;
    border: 2px solid #5B8731;
    color: #ffffff;
    padding: 10px;
    font-family: 'VT323', monospace;
    font-size: 16px;
    margin-bottom: 15px;
    box-shadow: inset -1px -1px 0 #3D5B20, inset 1px 1px 0 #7BAE49;
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}


.points-list {
        max-height: fit-content;
    }
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: #2F2F2F;
    padding: 20px;
    border: 3px solid #4A4A4A;
    border-radius: 0;
    box-shadow: inset -2px -2px 0 #1A1A1A, inset 2px 2px 0 #5A5A5A;
    max-width: 500px;
    width: 90%;
    color: #ffffff;
}

.modal h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.5em;
    text-shadow: 2px 2px #000000;
}

#csv-editor {
    width: 100%;
    margin-bottom: 15px;
    padding: 10px;
    border: 2px solid #5B8731;
    border-radius: 0;
    font-family: 'VT323', monospace;
    resize: vertical;
    background: #1D1D1D;
    color: #ffffff;
    min-height: 200px;
    box-shadow: inset -1px -1px 0 #5B8731, inset 1px 1px 0 #7BAE49;
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-buttons button {
    padding: 8px 15px;
    border-radius: 0;
    cursor: pointer;
    font-family: 'VT323', monospace;
    text-transform: uppercase;
}

#save-csv {
    background-color: #5B8731;
    color: white;
    box-shadow: inset -2px -2px 0 #3D5B20, inset 2px 2px 0 #7BAE49;
}


.modal-buttons button:hover {
    opacity: 0.9;
}

/* Toggle Switch Styles */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 24px;
    vertical-align: middle; /* Align with label text */
    margin-left: 5px; /* Add some space between label and switch */
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
}

input:checked + .slider {
    background-color: #8B0000;
}

input:focus + .slider {
    box-shadow: 0 0 1px #2196F3;
}

input:checked + .slider:before {
    -webkit-transform: translateX(16px);
    -ms-transform: translateX(16px);
    transform: translateX(16px);
}

/* Rounded sliders */
.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}

small {
    font-size: 0.8em;
    color: #888;   
}

.feedback-container {
    background: #2F2F2F;
    padding: 20px;
    border: 3px solid #4A4A4A;
    box-shadow: inset -2px -2px 0 #1A1A1A, inset 2px 2px 0 #5A5A5A;
    margin: 20px auto;
    max-width: 600px;
}

.feedback-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.feedback-form .input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.feedback-form textarea {
    background: #1D1D1D;
    border: 2px solid #5B8731;
    color: #ffffff;
    padding: 10px;
    font-family: 'VT323', monospace;
    font-size: 16px;
    height: 100px;
    resize: vertical;
    box-shadow: inset -1px -1px 0 #3D5B20, inset 1px 1px 0 #7BAE49;
}

#send-feedback {
    align-self: flex-end;
    margin-top: 10px;
}

.footer-container {
    text-align: center;
    padding: 20px;
    background: #2F2F2F;
    border-top: 3px solid #4A4A4A;
    box-shadow: inset -2px -2px 0 #1A1A1A, inset 2px 2px 0 #5A5A5A;
}