* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Noto Sans KR", sans-serif;
}

body {
    background-color: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 800px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.translator-box {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-section,
.output-section {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    background-color: #fff;
}

.language-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.detected-language,
.translation-style {
    font-size: 14px;
    color: #666;
}

select {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #ddd;
    background-color: #f9f9f9;
    font-size: 14px;
    cursor: pointer;
}

textarea {
    width: 100%;
    height: 150px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    resize: none;
    font-size: 16px;
    margin-bottom: 10px;
}

textarea:focus {
    outline: none;
    border-color: #4285f4;
}

.text-controls {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

button {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background-color: #f0f0f0;
    color: #333;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.2s;
}

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

#translate-btn {
    background-color: #4285f4;
    color: white;
    font-size: 16px;
    padding: 12px 24px;
    width: 100%;
    margin-top: 20px;
    justify-content: center;
}

#translate-btn:hover {
    background-color: #3367d6;
}

.swap-languages {
    display: flex;
    justify-content: center;
    margin: -10px 0;
    position: relative;
    z-index: 2;
}

#swap-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #4285f4;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

#swap-btn:hover {
    background-color: #3367d6;
}

#target-text {
    background-color: #f9f9f9;
}

/* 페이지 래퍼 및 광고 컨테이너 스타일 */
.page-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.ad-container {
    width: 300px;
    min-width: 300px;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ad-content {
    position: sticky;
    top: 30px;
    width: 100%;
}

.ad-placeholder {
    width: 100%;
    height: 600px;
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    color: #999;
    text-align: center;
}

/* 1200px 이하에서는 광고 숨기기 */
@media (max-width: 1200px) {
    .ad-container {
        display: none;
    }

    .page-wrapper {
        display: block;
    }
}

/* 반응형 스타일 */
@media (max-width: 1200px) {
    body {
        padding: 0;
    }

    .container {
        max-width: 100%;
        border-radius: 0;
        box-shadow: none;
        padding: 20px;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 15px;
    }

    textarea {
        height: 120px;
    }

    .language-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .language-select,
    .detected-language,
    .translation-style {
        width: 100%;
    }
}

.translation-instructions {
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.instructions-header {
    padding: 12px 15px;
    background-color: #f5f5f5;
    font-weight: 500;
    color: #555;
}

.instructions-content {
    padding: 15px;
    background-color: #fafafa;
}

.instructions-content p {
    margin-bottom: 8px;
    color: #666;
}

.example-text {
    font-size: 13px;
    color: #888;
    font-style: italic;
}

#translation-instructions {
    height: 60px;
    margin-top: 10px;
    background-color: white;
    width: 100%;
}

.disclaimer {
    margin-top: 15px;
    text-align: center;
    color: #777;
    font-size: 14px;
    padding: 8px;
    background-color: #f9f9f9;
    border-radius: 6px;
    line-height: 1.4;
}

.disclaimer p {
    margin: 0;
}

/* 반응형에서의 스타일 조정 */
@media (max-width: 600px) {
    .disclaimer {
        font-size: 13px;
        margin-top: 12px;
    }
}
