/* styles.css */

/* 기본 스타일 */
body {
    font-family: 'Noto Sans KR', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    color: #212529;
}

h1 {
    text-align: center;
    color: #343a40;
    margin: 20px 0;
    font-size: 24px;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f4f4f4;
    border-radius: 8px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
}

#logo-container {
    text-align: center;
    width: 100%;
    position: relative;
}

#logo {
    width: 80px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

#logo:hover {
    transform: scale(1.1);
}

#question-container {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background-color: #f1f3f5;
}

#answer-container {
    display: flex;
    margin-bottom: 20px;
}

#answer-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 16px;
    margin-right: 10px;
}

button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    background-color: #007bff;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #0056b3;
}

#controls-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

#result-container {
    padding: 20px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background-color: #f8f9fa;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 10px;
}

.button-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

/* 반응형 디자인 */
@media (max-width: 600px) {
    .container {
        padding: 15px;
    }

    #answer-container {
        flex-direction: column;
    }

    #answer-input {
        margin-right: 0;
        margin-bottom: 10px;
    }

    #controls-container {
        flex-direction: column;
        align-items: stretch;
    }

    button {
        margin-bottom: 10px;
    }

    button:last-child {
        margin-bottom: 0;
    }
}

/* Fade-in 효과 */
.fade-in {
    opacity: 0;
    animation: fadeIn 0.5s forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ✨ 로그인 안내 카드 스타일 */
.login-notice {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 300px;
}

.login-card {
    padding: 30px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 400px;
}

.login-card h2 {
    margin-bottom: 20px;
    font-size: 20px;
    color: #333;
}

.login-card button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.login-card button:hover {
    background-color: #0056b3;
}

/* ✨ 전체 배경 */
body {
    background: linear-gradient(135deg, #e9f0f5, #ffffff);
}

/* 사용자 우측 상단 아이디 박스 (float right, container 내부) */
.user-box {
    background-color: #007bff;
    color: white;
    padding: 8px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    z-index: 1000;
    position: relative;
    float: right;
    margin-top: -40px;
}

.user-menu {
    display: none;
    position: absolute;
    top: 40px;
    right: 0;
    background-color: #ffffff;
    color: #333;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    width: 180px;
}

.user-menu p {
    margin: 0 0 8px 0;
    font-size: 14px;
}

.user-menu a {
    text-decoration: none;
    color: #007bff;
    font-size: 14px;
}

.user-menu a:hover {
    text-decoration: underline;
}

.user-box {
    background-color: #007bff;
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 600px) {
    .user-box {
        font-size: 12px;
        max-width: 90px;
    }
}


.profile-container {
    max-width: 500px;
    margin: 50px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
    text-align: center;
}

.profile-container h2 {
    margin-bottom: 20px;
    font-size: 24px;
    color: #007bff;
}

.profile-info {
    font-size: 18px;
    margin-bottom: 30px;
}

.profile-links a {
    display: inline-block;
    margin: 0 10px;
    color: #007bff;
    text-decoration: none;
    font-size: 16px;
}

.profile-links a:hover {
    text-decoration: underline;
}

/* 로고 + 사용자 아이디 한 줄 상단 */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
}

.logo-wrapper {
    flex: 1;
    text-align: center;
}

#logo {
    width: 80px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

#logo:hover {
    transform: scale(1.1);
}

/* 사용자 아이디 박스 */
.user-box {
    background-color: #007bff;
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    max-width: none;
    overflow: visible;
    text-overflow: unset;
    position: relative;
    z-index: 1000;
}

/* 사용자 팝업 메뉴 */
.user-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background-color: #ffffff;
    color: #333;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    width: 180px;
}

.user-menu p {
    margin: 0 0 8px 0;
    font-size: 14px;
}

.user-menu a {
    text-decoration: none;
    color: #007bff;
    font-size: 14px;
}

.user-menu a:hover {
    text-decoration: underline;
}

/* 반응형 사용자 박스 */
@media (max-width: 600px) {
    .user-box {
        font-size: 12px;
        max-width: 100%;
    }
}
