#termsModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 10001;
    overflow-y: auto;
}

.terms-modal-content {
    position: relative;
    max-width: 800px;
    margin: 50px auto;
    background: white;
    border-radius: 10px;
    padding: 0;
}

.terms-header {
    padding: 25px 30px;
    border-bottom: 2px solid #e8730c;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.terms-modal-content h2 {
    margin: 0;
    color: #333;
    font-size: 24px;
    font-weight: bold;
}

.terms-close {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: #666;
    line-height: 1;
}

.terms-body {
    padding: 30px;
    max-height: 60vh;
    overflow-y: auto;
}

.terms-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.terms-modal-content h3 {
    color: #e8730c;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: bold;
}

.terms-section p {
    line-height: 1.8;
    color: #555;
    margin: 10px 0;
}

.terms-section ul {
    margin: 10px 0;
    padding-left: 20px;
}

.terms-section ul li {
    line-height: 1.8;
    color: #555;
    margin: 8px 0;
}

.terms-important {
    background: #fff3cd;
    border-left-color: #ffc107;
    padding: 15px;
    margin: 20px 0;
    border-radius: 6px;
}

.terms-important strong {
    color: #856404;
}

.terms-footer {
    padding: 20px 30px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 0 0 10px 10px;
}

.terms-agree-box {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 2px solid #ddd;
}

.terms-checkbox-group {
    margin: 15px 0;
}

.terms-checkbox-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 12px;
    border-radius: 6px;
    transition: background 0.2s;
}

.terms-checkbox-group label:hover {
    background: #f8f9fa;
}

.terms-checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
}

.terms-checkbox-group span {
    font-size: 15px;
    color: #333;
}

.terms-actions {
    display: flex;
    gap: 15px;
}

.terms-btn {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.terms-btn-cancel {
    background: #6c757d;
    color: white;
}

.terms-btn-cancel:hover {
    background: #5a6268;
}

.terms-btn-submit {
    background: #e8730c;
    color: white;
}

.terms-btn-submit:hover {
    background: #cf6400;
}

.terms-btn-submit:disabled {
    background: #ddd;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .terms-modal-content {
        margin: 10px;
        width: calc(100% - 20px);
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .terms-header {
        padding: 15px;
    }
    
    .terms-modal-content h2 {
        font-size: clamp(12px, 3.7vw, 18px);   /* 긴 제목이 모바일서 두 줄 안 되게 화면폭에 맞춰 자동 축소 */
        white-space: nowrap;
    }
    
    .terms-body {
        padding: 15px;
        max-height: 50vh;
    }
    
    .terms-section {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .terms-section p {
        font-size: 14px;
        line-height: 1.6;
    }
    
    .terms-section ul li {
        font-size: 14px;
        line-height: 1.6;
    }
    
    .terms-modal-content h3 {
        font-size: 15px;
    }
    
    .terms-footer {
        padding: 15px;
    }
    
    .terms-agree-box {
        padding: 15px;
    }
    
    .terms-checkbox-group label {
        padding: 10px;
    }
    
    .terms-checkbox-group span {
        font-size: 14px;
    }
    
    .terms-btn {
        padding: 12px;
        font-size: 15px;
    }
}
