/* 기본 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Noto Sans KR', sans-serif;
}

/* 폰 프레임 스타일 */
.phone-frame {
    width: 100%;
    max-width: 540px; /* 1080의 절반 */
    aspect-ratio: 9/16;
    background: #000;
    border-radius: 40px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

/* 노치 스타일 */
.notch {
    width: 150px;
    height: 25px;
    background: #000;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    z-index: 2;
}

/* 폰 스크린 스타일 */
.phone-screen {
    width: 100%;
    height: 100%;
    background: none;
    background-size: contain; /* cover에서 contain으로 변경하여 이미지 전체 표시 */
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll; /* fixed에서 scroll로 변경 (모바일 최적화) */
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.input-container {
    width: 90%;
    max-width: 400px;
    margin: 20px auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    top: 50%;
    transform: translateY(-50%);
}

.input-container h1 {
    color: #fff;
    text-align: center;
    margin-bottom: 20px;
    font-size: 24px;
}

#questionInput {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    margin-bottom: 15px;
    resize: none;
    box-sizing: border-box;
    min-height: 120px;
}

.submit-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: #4a90e2;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.submit-btn:hover {
    background: #357abd;
}

.submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.background-drop-zone {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    padding: 20px;
    border: 2px dashed #4a90e2;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(128, 128, 128, 0.8);
    backdrop-filter: blur(5px);
    z-index: 100;
}

.background-drop-zone.dragover {
    background: rgba(74, 144, 226, 0.8);
    border-color: #357abd;
}

.drop-zone-content {
    color: #fff;
}

.drop-zone-content i {
    font-size: 24px;
    margin-bottom: 10px;
    color: #4a90e2;
}

.drop-zone-content p {
    margin: 5px 0;
}

.sub-text {
    font-size: 12px;
    opacity: 0.8;
}

.confirm-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    text-align: center;
    z-index: 1000;
    animation: popupFadeIn 0.3s ease-out;
    min-width: 300px;
}

.confirm-popup::before {
    content: '✓';
    display: block;
    font-size: 48px;
    color: #4CAF50;
    margin-bottom: 15px;
}

.confirm-popup p {
    margin: 0;
    font-size: 18px;
    color: #333;
    font-weight: 500;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* 팝업 배경 오버레이 */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    animation: overlayFadeIn 0.3s ease-out;
}

@keyframes overlayFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* QR 코드 섹션 스타일 */
.qr-section {
    position: fixed;
    top: 50%;
    right: 420px;
    transform: translateY(-50%);
    width: 250px;
    padding: 20px;
    background: rgba(128, 128, 128, 0.8);
    backdrop-filter: blur(5px);
    border-radius: 10px;
    text-align: center;
    z-index: 100;
}

.qr-container {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.qr-text {
    color: #fff;
    margin-top: 10px;
}

/* 업로드 성공 팝업 스타일 */
.upload-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    text-align: center;
    z-index: 1000;
    animation: popupFadeIn 0.3s ease-out;
    min-width: 300px;
}

.upload-icon {
    font-size: 48px;
    color: #4CAF50;
    margin-bottom: 15px;
}

.upload-popup p {
    margin: 0;
    font-size: 18px;
    color: #333;
    font-weight: 500;
}

/* 반응형 스타일 */
@media (max-width: 1200px) {
    .phone-frame {
        max-width: 450px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    .phone-frame {
        max-width: 350px;
        border-radius: 30px;
    }

    .phone-screen {
        padding: 15px;
    }

    .input-container {
        padding: 15px;
    }

    .input-container h1 {
        font-size: 20px;
    }

    #questionInput {
        min-height: 100px;
        font-size: 14px;
    }

    .submit-btn {
        padding: 10px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .phone-frame {
        max-width: 300px;
        border-radius: 20px;
    }

    .notch {
        width: 120px;
        height: 20px;
        border-bottom-left-radius: 10px;
        border-bottom-right-radius: 10px;
    }

    .phone-screen {
        padding: 10px;
    }

    .input-container {
        padding: 10px;
    }

    .input-container h1 {
        font-size: 18px;
    }

    #questionInput {
        min-height: 80px;
        font-size: 12px;
    }

    .submit-btn {
        padding: 8px;
        font-size: 12px;
    }
} 