/* 기본 스타일 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 800px;
    box-sizing: border-box;
}

h1 {
    color: #343a40;
    margin-bottom: 20px;
    font-size: 24px;
}

.upload-section,
.url-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 15px;
}

.upload-section input[type="file"] {
    padding: 10px;
    border: 2px dashed #6c757d;
    border-radius: 8px;
    width: 100%;
    max-width: 400px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.upload-section input[type="file"]:hover {
    background-color: #e9ecef;
}

.url-section {
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

.url-section input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    margin-right: 10px;
    font-size: 16px;
}

.url-section button {
    padding: 10px 20px;
    border: none;
    background-color: #007bff;
    color: #ffffff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.url-section button:hover {
    background-color: #0056b3;
}

.options {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.options label {
    font-size: 16px;
    color: #495057;
    display: flex;
    align-items: center;
}

.options input[type="checkbox"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
}

.canvas-container {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: auto;
    max-height: 70vh;
    margin-bottom: 20px;
}

canvas {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    max-width: 100%;
    height: auto;
}

/* 버튼 스타일 */
button {
    padding: 12px 24px;
    margin: 5px;
    border: none;
    border-radius: 8px;
    background-color: #28a745;
    color: #ffffff;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #218838;
}

#downloadBtn {
    background-color: #17a2b8;
}

#downloadBtn:hover {
    background-color: #117a8b;
}

/* 반응형 디자인 */

/* PC 및 대형 디스플레이 */
@media (min-width: 1200px) {
    .container {
        max-width: 1000px;
        padding: 30px;
    }

    h1 {
        font-size: 28px;
    }

    .url-section input {
        font-size: 18px;
    }

    .url-section button,
    button {
        font-size: 18px;
        padding: 14px 28px;
    }

    .options label {
        font-size: 18px;
    }
}

/* 태블릿 세로 */
@media (min-width: 768px) and (max-width: 991px) and (orientation: portrait) {
    .container {
        max-width: 700px;
        padding: 25px;
    }

    h1 {
        font-size: 26px;
    }

    .url-section input {
        font-size: 17px;
    }

    .url-section button,
    button {
        font-size: 17px;
        padding: 13px 26px;
    }

    .options label {
        font-size: 17px;
    }
}

/* 태블릿 가로 */
@media (min-width: 768px) and (max-width: 991px) and (orientation: landscape) {
    .container {
        max-width: 800px;
        padding: 25px;
    }

    h1 {
        font-size: 26px;
    }

    .url-section input {
        font-size: 17px;
    }

    .url-section button,
    button {
        font-size: 17px;
        padding: 13px 26px;
    }

    .options label {
        font-size: 17px;
    }
}

/* 모바일 가로 */
@media (min-width: 481px) and (max-width: 767px) and (orientation: landscape) {
    .container {
        max-width: 600px;
        padding: 20px;
    }

    h1 {
        font-size: 22px;
    }

    .url-section input {
        font-size: 16px;
    }

    .url-section button,
    button {
        font-size: 16px;
        padding: 12px 24px;
    }

    .options label {
        font-size: 16px;
    }
}

/* 모바일 세로 */
@media (max-width: 480px) and (orientation: portrait) {
    .container {
        padding: 15px;
    }

    h1 {
        font-size: 20px;
    }

    .upload-section input[type="file"],
    .url-section input {
        font-size: 14px;
    }

    .url-section button,
    button {
        font-size: 14px;
        padding: 10px 20px;
    }

    .options label {
        font-size: 14px;
    }
}
